Things that were actually accomplished:
Code was operational
Troubleshooted the system
- Code can be seen using this link: https://docs.google.com/document/d/13rn23kiAMY7ovi3cRF-_pt-kocN8uBqWrs1T-pzl6as/edit?usp=sharing
- However, ran into issues with the motor
- Motor did not run
- The circuit was not the issue because tested the Load Cell and Motor codes independently and they functioned fine
- Manipulated the code a bit by checking to see if the conditional statement where the remainder of the counter divided by the sampling rate was the issue was the issue and it wa
Discussion:
"Psuedocode" Example:
Goal of the code:
The purpose of the code is to have the load cell and motor function together and send signals to Arduino IDE's serial port at certain frequencies. Load cell frequencies should be sent more frequently than the motor frequencies. Code should serve as an on/off switch to initate the motor. For example, when this "switch" is on the motor should move one step while sending both motor and load cell signals to the serial port. When the "switch" is off, the motor will not move, but load cell signals will still be sent. This on/off value will change depending on what sampling frequency you choose for the load cell/motor cell.
A list of important variable for this code can be seen through this link:
https://docs.google.com/spreadsheets/d/1W6N8Waigp3AQau0siCscyPppRLrzqh0uY-iHfFVcS2g/edit?usp=sharing
Important Functions:
IF
"counter is <= to the number of motor steps"
then:
increase the increment of the counter
move on to next condition
IF
"the remainder of the counter divided by LM is equal to 0"
then:
move the motor by 1 step
Send Load cell signals and motor signals to serial port
increment the step counter
ELSE
send load cell signals only to the serial port
END CODE
LM Calculations:
https://docs.google.com/spreadsheets/d/1bv9c2lkUphbR2MvfSw1bN1S9Le1lJO9o07MTHc__tS8/edit?usp=sharing
Goals for the next week:
- Modify the code and verify it works!
- Configure code with MATLAB???
No comments:
Post a Comment