POE | FALL 2018
  • About
  • System
    • Mechanical
    • Electrical
    • Firmware
  • Process
    • Sprint I
    • Sprint II
    • Sprint III
    • Sprint IV

Firmware

Picture
Flowchart of the firmware

Overview




The software system was designed so that the light system, sound system and leaf shrinking mechanism could work independently. The main for loop only has 3 functions: senseSound(), senseLight(), and pullLeaves(), and can be used separately if needed. All functions are pseudo-parallel using timestamps from the millis() command. 


View our code on Github.

Calibration Instructions

To calibrate the photo resistors:
  • In LightSystem.h, set f_cal, br_cal, and bl_cal to zero
  • In NewLightSoundLeaf.ino, set the parameter for SenseLight3 in the main loop to true
  • Plug in the plant and place in normal lighting conditions, then open the Arduino serial monitor
  • Note the differences in the three sensor values, and add a calibration value to each that makes them equivalent (for example, if the numbers were 783, 812, and 804 you could normalize to 800 and have the calibration values be 17, -12, and -4)
To calibrate the sound sensors:
  • In SoundSystem.h, set f_cal, r_cal, and l_cal to zero
  • ​In NewLightSoundLeaf.ino, set the parameter for senseSound in the main loop to true
  • Plug in the plant and place in normal sound conditions, then open the Arduino serial monitor
  • Note the differences in the three sensor values, and add a calibration value to each that makes them 0 (for example, if the numbers were 18, 45, and -10, the calibration values be -18, -45, and 10)

For questions about calibration please email minhkhang.vu@students.olin.edu or luis.zuniga@students.olin.edu
  • About
  • System
    • Mechanical
    • Electrical
    • Firmware
  • Process
    • Sprint I
    • Sprint II
    • Sprint III
    • Sprint IV