Programming - Changes before Wiring

A project log for Not Just Another Coffee Table

Custom coffee table with a DCC train track, automation, LEDs and a web interface

Jack FlynnJack Flynn 12/10/2018 at 14:410 Comments

Now that the electronics hardware has been confirmed, I've been able to update the code bases to better reflect the hardware we'll use. You can see my code on github

The main changes on the Arduino/Teensy side have been to support the i2c PWM boards, as well as the Neopixel RGB strip. Instead of stripping out and re-writing from scratch I took the classes I had made for the placeholder hardware and added support for the new additional hardware. This means that my local test piece still works but I can easily change the code over to the new hardware once I get it up and running.

On the Django/Webserver side of things I was adding support for the Servos which will be used to control the track point switching. The buttons have been added and I've included an image of the track layout to make it clearer what areas the servos affect. I'd like to add a further layer to the interface that indicates what position the track switch points are in and how the servos effect this. It's a work in progress.

Further backend work was also done so now the Django database is updated when commands are sent to the Arduino Effects Manager. This means when we refresh the page it should show the current positon of all of the connected hardware. A future development will be to add feedback from the Arduino Effects Manager so that the database is fully reflective of the hardware. Currently we're working on the assumption that the database and physical hardware currently match up which might not be the case at first start.