You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Server/ADC.py is an interface to an analog to digital converter. See if you can figure out what it is wired to, and what things can be read from the robot. The raspberry pi does not have any analog pins that it can read. It has to use the I2C bus to read analog values determined my another chip.
I know that it is used to implement the POWER command.
Actually, it does look like it might read battery voltage (I'm wondering what other channels might be able to read?)
In Server/server.py, there is this function. See if you can figure out what it does (and when).
`
def Power(self):
while True:
ADC_Power=self.adc.recvADC(2)*3
time.sleep(3)
if ADC_Power < 6.8:
for i in range(4):
self.buzzer.run('1')
time.sleep(0.1)
self.buzzer.run('0')
time.sleep(0.1)
elif ADC_Power< 7:
for i in range(2):
self.buzzer.run('1')
time.sleep(0.1)
self.buzzer.run('0')
time.sleep(0.1)
else:
self.buzzer.run('0')
`
mcolinj
changed the title
Figure out what the ADC (Analog to Digital Converter) is used for with the POWER command
Figure out (and rewrite) the ADC (Analog to Digital Converter) to monitor battery voltage. Document the other ADC inputs so we can use them.
Nov 10, 2020
Server/ADC.py is an interface to an analog to digital converter. See if you can figure out what it is wired to, and what things can be read from the robot. The raspberry pi does not have any analog pins that it can read. It has to use the I2C bus to read analog values determined my another chip.
I know that it is used to implement the POWER command.
In Server/server.py, there is this code:
`
elif cmd.CMD_POWER in data:
`
You could look in the client code and see what it does with it. (maybe just displays it?)
It could be accessing the voltage reading of the battery, which would be very useful.
Note: You can also look at the Freenove documentation to see if it explains the POWER command output.
See if you can figure out if there are other ADC channels we could use to read some other analog values
on the robot.
The text was updated successfully, but these errors were encountered: