ECE434 Project - Comrade Candles: Linked Lighting
Embedded Linux Class by Mark A. Yoder
I'm using the following template to grade. Each slot is 10 points. 0 = Missing, 5=OK, 10=Wow!
09 Executive Summary 09 Packaging 09 Installation Instructions 09 User Instructions 09 Highlights 09 Theory of Operation 09 Work Breakdown 09 Future Work/Conclusions 09 Hackster.io 09 Demo/Poster 00 Not Late Score: 90/100
(I left in the instructions so we can see them and edit more accordingly-Sam)
Picture that summarizes the project.
Give two sentence intro to the project. Comrade Candles are a set of customizable led strips that synchronize colors and flashing speeds over the internet, It also has a sound implementation that allows preloaded songs to be played as well. This allows users to have a creative way to communicate and express themselves with a friend so long as both have an internet connection.
Give two sentences telling what works. Using flask and pagekite, we are able to use a Beagle Bone to run python files on another Beagle Bone. Using this concept, we have implemented a way for the lights to change on one Beagle and Match the other, as well as play matching audio files (so long as both Bones have the audio file downloaded).
Give two sentences telling what isn't working. The IR remote input was not ale to be implemented for the project. With the remote and transceiver we chose to use and a lack of libraries to use for decoding signals. We could not find any consistent patterns that distinguished each signal from the remote, making it impossible for us to implement.
End with a two sentence conclusion. Using the method that implemented the comrade candle project, we are able to create a way to synchronize operations on two bones so long as they have the same scripts on them. While this was used for our comrade candle project, there is a vast range of projects such concepts to apply to. The files should also be able to be modifiable to incorporate more than 2 bones as well. The only negative side is pagekite has only a month long trial so a free solution that could last permanently would be preferred and ideal for a user.
The sentence count is approximate and only to give an idea of the expected length.
If you have hardware, consider Small Build, Big Execuition for ideas on the final packaging.
- Github Repository: https://github.com/rutantj/comrade-candles-ECE434. The final code for this project is in musicAndLED folder but you can use the other folders to implement only certain parts of the project. It should be noted that while the ir-and-uart files have the ability to take input from an IR sensor, it can not reliably distinguish between different inputs and should not be used in its current state.
- Before we can run the code we must first setup Pagekite accounts to allow our bones to be access through the internet. Head over to https://pagekite.net/, make an account and curl Pagekite to the bone using the following: TODO show how to curl Pagekite
- After navigating to the musicAndLED folder, set up the PRU (our code uses PRU0 but you could configure it to work with PRU 1) source the setup.sh file. Then log in as root and run make (sudo will not work with the make file)
bone1$ source setup.sh bone1$ make
TODO: talk about make file problem
Finally, we will connect to our Pagekite page
bone1$ python pagekite username1.pagekite.me
Your bone is now ready to run the code! Open a new terminal and run serverLED.py and you'll bone will be ready to communicate.
- The last step is to repeat this process with the 2nd bone and your bones you're ready to start sending LED messages to each other.
bone2$ source setup.sh bone2$ make bone2$ python pagekite username2.pagekite.me TODO: double check this bone2$ serverLED.py
Once everything is installed, how do you use the program? Give details here, so if you have a long user manual, link to it here.
Consider making it autostart for full credit.
Here is where you brag about what your project can do.
Include a YouTube demo the audio description.
Theory of Operation
Give a high level overview of the structure of your software. Are you using GStreamer? Show a diagram of the pipeline. Are you running multiple tasks? Show what they do and how they interact.
List the major tasks in your project and who did what.
Sam worked primarily on getting the LEDs to run properly with the PRU by using examples from the PRU Cookbook and also helped out Tom with the online interactivity. Tom worked on the Flask and Pagekite features which allowed the Bones to updated each other's LEDs and audio tracks. T.J. worked on the the music playing feature and the IR remote feature that did not end up in the final model of the project. You can read more about that below.
Also list here what doesn't work yet and when you think it will be finished and who is finishing it.
We originally had plans to have the music and LEDs update from an IR remote that would send commands to an IR receiver on the Bone. We managed to get the UART communication on the BeagleBone to work via Adafruit's UART module in Python and had the IR pulses written to the terminal by using pySerial. Our issue was with processing the signals, as the input from a single button would often deviate between button presses and the signals from different buttons would often be too similar to distinguish. We were hoping we could calculate the Hamming Distance of a received signal and match it with the closest of the expected values for the implemented commands, but there wasn't a large enough difference between the signal values to use this process effectively.
Given more time, we would have liked to add this as one of the ways to interact with the Bone and provide a better user experience. The code examples and documentation from this feature's development have been left in the GitHub repository.
Give some concluding thoughts about the project. Suggest some future additions that could make it even more interesting.
From this project, we learned a lot about how the interface with the Internet by using multiple Bones and communicate with each other indirectly by using Flask and Pagekite. We also learned more about how the UART protocol works and how to find new useful Python modules that run on the BeagleBone Black. We now have a better understanding of how research and development for embedded systems works and how to adapt to issues with preliminary design ideas and complicated software.
Embedded Linux Class by Mark A. Yoder