Week 10 – Code Improvements and Iteration (Team RMB)

RMB (Team 12)
Author: Roy Yan Zibo – zyan4194
Team Members: Bening Wardani – bwar5236 / Minyi Tsai – mtsa6146

We found a solution to the problem that we faced last week. We borrowed a USB adaptor that can be connected to our MacBook and also the power socket. This gives our MacBook a bigger power and alleviates the issue that we had. We can now control all 50 LED strings without a hassle.

IMG_7490.JPG

We then started to improve the technical side of our design. We are planning to use two LED string lights (50 LEDs each), one to be put in the Miniature Garden and one to be hanged above. Our plan is to create two interactions, one to the lights above and another one in the garden below.

For the Miniature Garden, we are going to create interactions using the Ultrasonic Sensor. Since the Miniature Garden will be located on the ground, we have decided to use Ultrasonic Sensor as visitors might not notice that they can interact with our installation. Hence, we have settled with the idea of using visitors’ distance to trigger the interaction. When someone walks nearer to our installation, the Miniature Garden will light up and produce different lighting effects. 

IMG_7498

We tried to connect more than one ultrasonic sensors to the breadboard and test if it can detect the distance as intended. Instead of connecting it to the LED string, we tried it first with an individual LED. The LED lights up, indicating that our code is working as planned.

IMG_7467

We tried to add three more ultrasonic sensors, this is to ensure that we can cover the area as wide as our installation. We then connected the string lights to our Redboard and tried out a few examples from the library. The lights failed to turn on and we realised that our cables have been short-circuited. We learned that the metal cover in the cables cannot be in contact with one another. 

IMG_7500.JPG

IMG_7497

After taping the metal cover and separating the cables, the lights finally worked. We then proceeded to try coding the first interaction, which is making the lights to illuminate one by one as participant walk closer to the installation.

The lights managed to change based on the distance that we have set in the coding.  We then tried different examples from the library to make the lights to elicit a more playful effect.

We then tried to set up different distance to trigger different lights effects. In the video below, you will be able to see the changes depending on the distance.

However, we noticed that the overall changes in values are rather “jumpy”. We then tested the Ultrasonic sensor one by one, and then we found out that two of the sensors were not actually working properly. 

We removed the broken sensors and we moved on to work out the second interaction, which is the string lights that we plan to hang above the garden. We have decided to use a PIR sensor to trigger the lights to turn on. We used PIR sensor as these string lights will be located around the eye-level of the visitors. Hence, visitors can trigger the interaction by waving or tapping the area within the sensor.

I

We have clipped a lot of “airplanes” made from popsicle sticks along the string lights, and we want to make the lights to illuminate in three different states -> Lights up each LED one by one in red color -> Green blinking lights -> Sparkle in orange colour. However, we faced an issue with the code.

屏幕快照 2018-10-15 下午5.42.18

The function “ChangePalettePeriodically” was apparently not declared, although we have included it after the loop() function. We tried to fix the code but we kept running to the same issue. By analyzing the code, we realized that some lines of code were placed in the wrong place. After we moved  “static uint8_t startIndex = 0;”, “startIndex = startIndex + 1; “, and “FillLEDsFromPaletteColors( startIndex);” to the loop function, there was no more error messages. 

We will have our second consultation with the tutors tomorrow to see what we can do to improve the technical side of our design.

Leave a comment