[x] Problem 1: Servo motor
Problem: the starting, ending angle of servo motor are not precise. The rotation rate of servo motor is not stable.
Often times it just clogs.
Solution: implement an additional servo motor driver voltage level shifter breakout board that takes in a GPIO PWM and outputs a higher- voltage-protected PWM wave that feeds to the servo motor. With separate power supply and reworked PWM wave GPIO output, the behaviour is now stable.
[x] Problem 2: Sound sensor
Problem: sound sensor tends to behave unstably with different main.c settings(loop VS one go). And it tends to have limited accuracy distinguishing between short sharp sounds and long gentle sounds.
Solution: Reconfigured the structure of code. Changing looped sound.c to a one-go structure. Redesigned the way function gets called. Redesigned the way ADC reads in the analog input and the threshold values.
[x] Problem 3: joystick
Problem: the output range of joystick is quite random. Distinguishing left and right can be confusing. Because of the analog nature of the joystick, there is no actual solution. We redesigned the determining algorithm to better improve the accuracy.
[x] Problem 4: main.c
Problem: our initial plan was to pick up the following inputs in a sequencer: sound->apds->joystick. But when implementing this function, it gets stuck in one sensor, or, several inputs try to take over at the same time. It also happens when the main has passed the sound input part when the input sound was made. This led to an extremely unstable response from the system.
Solution: We decided to change the setting to a new algorithm: use apds to control/switch between 2 modes: 1. sound mode, 2. joystick mode. Waving the hand at the apds will switch one mode to another.
[x] Problem 1: Servo motor Problem: the starting, ending angle of servo motor are not precise. The rotation rate of servo motor is not stable. Often times it just clogs. Solution: implement an additional servo motor driver voltage level shifter breakout board that takes in a GPIO PWM and outputs a higher- voltage-protected PWM wave that feeds to the servo motor. With separate power supply and reworked PWM wave GPIO output, the behaviour is now stable.
[x] Problem 2: Sound sensor Problem: sound sensor tends to behave unstably with different main.c settings(loop VS one go). And it tends to have limited accuracy distinguishing between short sharp sounds and long gentle sounds. Solution: Reconfigured the structure of code. Changing looped sound.c to a one-go structure. Redesigned the way function gets called. Redesigned the way ADC reads in the analog input and the threshold values.
[x] Problem 3: joystick Problem: the output range of joystick is quite random. Distinguishing left and right can be confusing. Because of the analog nature of the joystick, there is no actual solution. We redesigned the determining algorithm to better improve the accuracy.
[x] Problem 4: main.c Problem: our initial plan was to pick up the following inputs in a sequencer: sound->apds->joystick. But when implementing this function, it gets stuck in one sensor, or, several inputs try to take over at the same time. It also happens when the main has passed the sound input part when the input sound was made. This led to an extremely unstable response from the system. Solution: We decided to change the setting to a new algorithm: use apds to control/switch between 2 modes: 1. sound mode, 2. joystick mode. Waving the hand at the apds will switch one mode to another.