Robobot calibration: Difference between revisions
No edit summary |
No edit summary |
||
| Line 16: | Line 16: | ||
The normalized value is between 0 (black - no reflection) and 1000 (calibrated white reflection). | The normalized value is between 0 (black - no reflection) and 1000 (calibrated white reflection). | ||
=== Start calibration === | |||
Place the sensor at the expected distance over a white surface with the expected reflectance (i.e. white tape). | |||
Send the command, e.g.: | |||
licw 100 | |||
where 100 means average over 100 samples. | |||
Once finished, save the values in the Teensy flash by: | |||
eew | |||
=== Get normalized data === | |||
Subscribe to data from the Teensy by the command | |||
sub livn 7 | |||
where 7 means update every 7 ms. This could be as low as 1, but the traffic load may give communication bottlenecks resulting in delay or lost messages. The communication limit is approximately 4000 messages per second (each below 64 characters). | |||
=== Distance sensor === | |||
Revision as of 09:18, 1 March 2025
Back to Robobot
Sending commands to the Teensy board using MQTT
Line sensor
The line sensor blinks the LED illumination and subtracts the non-illuminated from the illuminated.
These (raw) values are then normalized relative to a calibrated expected white value.
The normalized value is between 0 (black - no reflection) and 1000 (calibrated white reflection).
Start calibration
Place the sensor at the expected distance over a white surface with the expected reflectance (i.e. white tape).
Send the command, e.g.:
licw 100
where 100 means average over 100 samples.
Once finished, save the values in the Teensy flash by:
eew
Get normalized data
Subscribe to data from the Teensy by the command
sub livn 7
where 7 means update every 7 ms. This could be as low as 1, but the traffic load may give communication bottlenecks resulting in delay or lost messages. The communication limit is approximately 4000 messages per second (each below 64 characters).