First Project: Portal Name Badge - with music

Its been decades since I’ve worked in C and I’ve never touched c++ before.

But I decided to make a Portal name badge to go with my costume, showing name, tweets and vital information (still alive!)

Coding wise, it is a simple state machine that uses the internal timers to make sure everything happens.

Special stuff:
SSD1306 (.9" OLED). I’m configured to run off I2C.
Adadruit’s GFX library
Adafruit’s SSD1306 library

glados_quotes.h (3.05 KB)

portal_data.h (976 Bytes)

portal_logo.h (2.31 KB)

portalbadge.ino (10.8 KB)

still_alive_music.h (1.57 KB)

While the code above compiles and runs without help, I used a few build tools to make some of those files.

I put the tune together in JavaScript since I had a faster test cycle, and I used JavaScript to pad out the lines in the GladOS quotes.

I’ve renamed all the files with a .TXT extension. You’ll need to change those back.

Oh yea, since I forgot to mention it:

I went through the main .ino and tried to add some comments about what was going on. Nothing an experienced coder should need, but perhaps this will make it a little more friendly for some of our less experienced coders.

glados_quotes.html.txt (3.85 KB)

pitches.js.txt (1.19 KB)

stillalive.js.txt (4.25 KB)

Tones.html.txt (2.34 KB)

webaudio_tools.js.txt (4.76 KB)

Oops, forgot my extended library.

Jdriver.cpp (386 Bytes)

Jdriver.h (259 Bytes)