GUI time.

 

Coding efficiency is all about tools.

No tools, welcome back to software stone age. Icons by number.

Putting everything together..


  1. BulletA screen for choosing songs.

  2. BulletHardware to actually play the songs.

  3. BulletSome sort of mass storage to hold the music.

  4. BulletAn amplifier to drive the speakers.

  5. BulletSpeakers. Well..

  6. BulletEarbuds for now.

  7. BulletA processor to run everything.

  8. BulletA 3D designed and printed case.

  9. BulletFigure out how control SD card.

  10. BulletWrite code for the .mp3 player.

  11. BulletPatch the .mp3 library to start faster.

  12. BulletTry to get some more sleep!

  13. BulletSPI bus that functions correctly.

  14. BulletProcessor mount?

  15. BulletComplete SPI rewrite.

  16. BulletComplete redesign of the Development system.

  17. Bullet3D print finish quality issues.

  18. BulletNeed simple case to demo. problem.

  19. BulletWrite editing GUI for song selection.

  20. BulletAdd ability to group screen objects.

  21. BulletAdd point & click without a touch screen.

  22. BulletUsing .bmp file as background to GUI.

  23. BulletRead and write parameter files.

  24. BulletHints to the user as to what he could do.

  25. BulletTiny icons. Really?!


I had written a somewhat complete framework for building GUIs for these little processors. So this should be the frosting on the cake.


It was actually when I started working on the GUI that every thing crashed down on me. I took time off, pretty much finished the case design and did all the rework on the code. Once I got everything working. It was time to revisit the GUI.


I had a  fuzzy plan. It should be old ‘40s tech looking so I went for brass looking bezels with what looked like a stained paper card with typewriter file listings.


That was the plan..


Little small, but it says, “Click for menu.” And it fades to black after 3-4 seconds.. So cool! When this fades out, the screen is black and that is the “resting state” of the machine. I can tell it burns less power this way because the screen isn’t getting hot all the time.


Want to build one yourself?


Wiring notes : Are here.


To print your own:

3D Model files


And the code to make it go :

Source code

My Sound Card Lib.

Adafruit GFX Lib.

Adafruit OLED Lib.


The pushpot : Mouser # 652-39LB-1PB-103

 
As soon as a song starts to play, you get this one. It says “Click to mute.” It does not fade. Why? Because you can’t draw and run the music at the same time. The poor thing just huffs and puffs and sounds horrible.


That list.. Is a group of groups in a master object. Once you solve the N’th degree problem, you can recurse to your heart’s content. But solving it was tough!


Well, it looks  better in “real life” but that’s how it turned out. Tough to get a good type writer look with 8 pixel characters. And the fancy background forced me to set up code allowing a bitmap file to be used as the background. Then, with the grouping and coordinate shifting? Wow! My brain hurts!


I ended up with what I call the PushPot interface. The knob can be turned or clicked. Its sort of a one demential single button mouse. Highlighted icon shows focus.

Cheeseburger boxes make great stands.


<< Finish cleanup.     Done!>>

 

Before c++, the hardest part of most programs was the GUI. Hard to get right. The GUI would end up being 90% of your coding headache. And, cause most crashes. Not to mention the customers would hammer on it about everything. Then, with the introduction of application frameworks, all that nightmare just evaporated.