Tuesday, April 28, 2015

Week 4 (Outside Lab) - Software Experimentation

Figure 1. The brightness of an LED at different values set by a computer GUI.
At this meeting, the experimental graphical user interface (GUI ) and application were finished, and a small dialog box with a slider on the computer was able to control the brightness of a red LED. Figure 1 shows the relative brightness of the LED when the slider is set to values of 0, 26, and 195 (the minimum and maximum values were 0 and 255, respectively).

The code used for this experimental app can now be used as a basis for the actual PlantParent user control app, since it already connects the Arduino with the computer via Qt application. The next step is to create a computer app that can control the wait-time between blinks of an LED, including a termination command, which more directly corresponds to the structure of the code necessary for control of the PlantParent. 

Davina was able to write up an initial version of the Arduino code for this second step, which allowed us to control the blinking of the LED (using the Arduino serial monitor, not Qt yet), but only in a very limited way: either it would only blink on and off once after receiving a command - or, after putting the "blink" part of the code in a loop, it would blink endlessly with no way to break the loop with a serial command. Further research will hopefully mitigate this problem. 

No comments:

Post a Comment