LED & Pressure Sensors – Update
By Hannah Kwah, Joan Li & Putri Dina
Continuing from last week’s progress, we managed to get the serial communication between MAX and Arduino to work using the following programming.
The additional message we put was the ‘255 R G B’ to send it to the serial communication.
Using the code that LPD had given to us for Arduino, we managed to get two different colours when each of the sensors was activated.
We also added in a ‘default’ state when none of the pressure sensors were pressed so none of the lights were activated. The only challenge we are facing now is controlling the LED strip individually so we can divide the whole strip into two; the Left and the Right.
– Split LED strip into two
– Blinking effect?
We were trying to get the LED strip to be split into two so we were able to control the ‘left’ and ‘right’ indications. For now, we decided to use red for left and green for right to see the differences.
The programming in Max works well as we managed to receive the bangs for each values we get from the sensors. Instead of sending the RGB values to Arduino, we changed to values of 1, 2 and 0. However, we had difficulties trying to divide the LED strip into two. After thinking of the common sense behind the whole process and consulting the professor, we managed to get the following if statements.
The next challenge we encountered was getting Arduino to communicate with Max. There seemed to have some issues with the serial communication until we restarted the whole system and Arduino UNO.
So when user applies pressure on the left sensor, red lights up on half of the LED strip and ‘blank’ on the other half. Same goes to the right sensor where green lights up half of it.
Final Prototype Video Documentation