The LattePanda team is nearly finished making its Halloween project, which is perfect for placing outside houses with stores of candy for all! Now, trick-or-treaters who want to go out and get candy can do so while still being safe during these trying times, and the people who provide the candy can do so conveniently by allowing the LattePanda SBC to do all of the work for them. We’re hoping that, with projects like this, people can still find ways to enjoy the holidays with the advent of great technology!
*Picture portraying what part of the general result may look like at the time of completion. Will be substituted for pictures and video of real result soon.
The AlphaPanda
As we discussed before in our last article, we have decided to use the AlphaPanda to run Google’s Teachable Machine to recognize five distinct poses, which we trained and developed code for during this last week. We then needed to utilize node.js to take the outputs of this object-recognition algorithm and send them via a serial connection to the Arduino co-processor of the very same LattePanda Alpha….
Arduino Co-Processor
Given that all of the LattePanda SBC’s also have on-board Arduino Leonardo co-processors, this was a perfect decision, as we could allow the Arduino to receive the outputs from the Google Teachable Machine via a serial connection port. This serial port could only be esatblished via proper javascript and json packages to establish a serial connection with the on-board Arduino, which also needed its respective code to communicate on the same serial port. We then modified this Arduino code to work off of the ouptuts sent by the Google Teachable Machine, which could then be received by the Arduino co-processor and used to control one of five servos. As you may be able to guess now, the point of this code is for one of five successfully performed poses to open one of five candy boxes using one of the five servos, respectively. Once the pose is done and recognized successfully, the candy box corresponding to that pose will dispense candy to the trick-or-treater.
This way, the trick-or-treater is faced with an interesting challenge which makes the act of trick-or-treating more fun, safe, and interesting for those who wish to participate!
Have a fun and happy Halloween, and keep making!