Power Test 2 - Success!
Oh boy, it's been a while! There has been so much work put into the table, I simply don't know where to begin, but this weekend we tried our second ever power test and although there were some wiring teething issues it was awesome! The video below shows how far we've come and at night time the table looks fantastic. Each LED is individually controllable which can be seen in the second video as we're cycling through them with an on/off test code.
Programming improvements
So many things to cover but essentially we've followed the plan as intended. The wiring is working, the LEDs are lighting and the Pi and Teensy are talking so we have control via the web interface. I completed a pretty big overhaul of the code once I realised just how difficult it is to manage individual states of components like this. Originally the Teensy had defined addresses for each LED and was going to manage those locally but the power of the Pi running Django with a SQL database made it much clearer that the better way to do it was to use the Teensy as a physical interface and manage the states via the database. This means I can offload the LED automation from hard coded Teensy control, to a more flexible database system. So in the future I'll be able to make changes like adding groupings of LEDs (say Houses! for example) and with each LED added to the "Houses" group I can easily control the state of multiple LEDs with a group that can be reconfigured at any time without having to upload code!
Further work was also done to get the Pi automatically launching the Django server as well as my custom scripts for interfacing to the Teensy and the Dcc Controller.
Work, work, work
More of my weekend was taking up improving the code than actually working on the electronics. So we've got a fair bit more low level board work to do;
- Create interface board for Car LEDs (step up to 12v via transistors)
- Interface LDRs to Teensy
- Write so so much code for loads of cool automation tricks
- Power up and interface the RGB strip
- Configure Servos to handle track switching
- More development time to make the interface pretty!
- Play with trains! :D
We'll get there, big demo time will be Christmas!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.