TinkerFun, Part 3: Damned Rainbows

So this is the third and final part leading up the conclusion of Sprint 3. If you haven’t read Part 1 and Part 2 beforehand, be sure to do so.

We came together in the vacation on Friday to have the project assembled. plenty time was wasted I’d say (won’t go in detail about it but it could’ve gone a lot faster that day) but using schematics I managed to assemble the first Lumbox (the name of our project). By assembling I mean excluding the outer casing, that was the job of someone else in the group. It did as it should, we were hoping to be able to film our promotional clip by Monday after vacation, and that’s when things started to go awry.

Filming didn’t happen Monday. I don’t know the reason behind it but either it was because the project wasn’t put in its casing yet (on second thought I think that was the case) or we didn’t reserve our spot at the filming location on time. It was moved to Tuesday, so be it I suppose. Moving on, seeing as I took charge of the main functionality (binded random button + Neopixel and score to be displayed on LCD) I assumed someone else would take care of the rainbow light effect and Game Over + reset function. By Monday neither of those were done yet, keep in mind we only had two more days to go. Monday during school for me was spent helping around with the hopes others would be able to finish what had to be done.

By the end of the day the project was in its casing and functional, but the rainbow and game over + reset functionality was still lacking. Dagmar (one of my teammates) provided me with a rainbow script for the NeoPixel, So when around 6 at home I tried to implement it into the existing code. As nobody else had said anything of the game over function yet I assume that was being handled.

I couldn’t get the rainbow script to play nice in any way, so went and focussed on the other issue still left, the game over and reset function. First I asked in the group chat (after explaining how and why I couldn’t get the rainbow script working) if someone managed to finish the game over and reset function, while I was waiting for an answer, I went ahead and played around with Millis and its included tutorial, myself having an idea of how to get it done. After an hour of no response I sent a second message hoping I’d get reply but alas. This honestly got me pretty pissed since not only I felt I have provided enough compared to my peers, and not only coding, but also because at the end of the day we were only 2 days away from the presentation as well as having to film the next day, so an updated and finished code base would be nice. In the end I turned my anger into code and half an hour later we had working game over functionality and reset functionality. I also declared myself done, having provided more than enough by now.

Tuesday was a different day. After spending some time cranky about the night prior, I sat down with Dagmar to have a second look at the rainbow functionality, while others were taking care of the last bits before filming. We couldn’t get it to work so I made a compromise and just crudely coded 6 static colours into the 12 LED’s of the NeoPixel. If it works it works I suppose, the rest of the time was spent on non-group related activities, until around 13:30 when we were going to film.

Here comes the next issue. Someone else in the group was in charge of putting in together the second Lumbox. A second Lumbox was something most of us considered irrelevant but it is as it is. Seeing as I was ticked plenty enough I wasn’t there during this time. This Lumbox was supposed to be finished before we started filming, but it wasn’t, so when I came downstairs to look at it I was asked if I could help it along under the guise of “already being this far”. This struck wrong nerve as not only was filming getting delayed because of it, but I actually had class at 14:00 so now I wasn’t even getting the chance of being in the video because of it, and given how much I helped this project along I felt I deserved as much. I bluntly replied with “We zijn zo ver dat we uiteindelijk nog steeds diets heaven”, in other words, “We’ve made it this far that in the end we still got nothing”. The updated code wasn’t to be seen in the video and neither was I, all for a second Lumbox most of us didn’t see a purpose to that still wasn’t finished by the end of the day.

At last it was Wednesday, the video was made, most of the work was done, some final changes (or so I thought) made to the code making it more comprehensibly readable, code cleanup so to say, and adding the last bit where the first NeoPixel lights up (done upon request), and at last, during some supervising on my part, the second Lumbox was ready, time to upload the finalised code. You thought that was the end of the problems did ya? Wrong. The Neopixels wouldn’t turn on. but why? The final code works perfectly while tested in simulation. Upon quick review of the code I realised what was wrong, freaking strip.begin;. During the multiple revisions of the code and testing it in the simulator of TinkerCad those lines got lost as, what I mentioned earlier, TinkerCad’s simulator, for one reason or another, didn’t require that line, thus that line had never made it there and upon testing and subsequently saving the presumed finalised code that line of code got lost. Thank goodness I did the code cleanup, which included giving the code their dedicated functions, this way I only had to add that line in 2 places (ledOn and ledOff). Save and reupload into the Lumboxes and voila, everything worked as intended. Everything was done with half an hour to spare, and man did we take delight in that final half an hour.

All in all Our project was pretty well received, not just for my code but also because of the outer casing (credit where credit is due, Kudos to my teammates for that, they did a good job) which was kid friendly. Sure hope though that next time I don’t have to supply 90 to 95% of the code base, among other things, it’d make it a little easier on me.

You can test the finalized project here (Again, with the limitation of only 3 working Neopixels + buttons). Sorry for the long post, this was in part due to residual venting required.

One Reply to “TinkerFun, Part 3: Damned Rainbows”

Leave a Reply

Your email address will not be published. Required fields are marked *