PV sensor functions
From Rsewiki
Back to Wearher monitor modules
PV sensor
Teensy help page
The following functions are available from the Teensy side:
% Display ------- % -- disp text Set a display line text % -- dispon V Start stop display update V: 0=off % -- displayi and 'sub display N' Get current display text % -- dispinfoi and 'sub dispinfo N' Get some debug info % -- displayi and 'sub display N' Get current display text % -- dispinfoi and 'sub dispinfo N' Get some debug info % Teensy settings ------- % -- setidx N Set ID to N (sets robot name) (id=140) % -- sethw P Set PCB version to P (is=9) % -- start Start (activate something) % -- version Get version in SVN (is 2380) % -- power 0/1 12V power 1=on (is 1) % -- pind N v [p] Set pin N direction v=1 output, p=1 pull up, p=-1 pull down % -- pinda N Set pin N for AD value measurement (and get value once) % -- pinv N v Set pin N to v [0..1] % -- help Send on-line help % -- hbti and 'sub hbt N' Get time and robot state 'hbt time idx revision batVolt state hw bat-capacity shutdown_request' % -- idi and 'sub id N' Get device type and name 'name type name' % -- batti and 'sub batt N' Get battery status info 'batt time voltage current' (to Teensy and Raspberry) % -- pini and 'sub pin N' Get pin value (pin is set by 'pind') 'pin pin value' % -- pinai and 'sub pina N' Get pin analogue value (pin is set by 'pinda') 'pina pina value' %% USB ------- % -- echo A Send received characters back as received. A=0 not, A=1 yes (is=0) %% Sensor settings ------- % -- cur0 Set current offset to zero current. % -- cur5a s A Set current factor for sensor s to give A current. % -- pvci and 'sub pvc N' Get current (pvc C C C C C C C f) f=filter factor % -- pvrci and 'sub pvrc N' Get raw AD measurements (filtered) (pvrc C C C C C C C f) % -- pvcoi and 'sub pvco N' Get current offset (pvco o o o o o o o) % -- pvcai and 'sub pvca N' Get current scale factor (pvca sf sf sf sf sf sf sf) % Voltage sensor settings ------- % -- voltc s V Set scale factor for sensor 1..4 to read V Volt. % -- pvvi and 'sub pvv N' Get voltages (pvv V V V V) % -- pvrvi and 'sub pvrv N' Get raw AD measurements (pvrv V V V V) % -- pvvvi and 'sub pvvv N' Get raw scale factor (pvvv sf sf sf sf) %% EE (configuration flash) -------- % -- eew Save configuration to EE-Prom (flash) % -- eer Read configuration from EE-Prom % Display ------- % -- disp text Set a display line text % -- dispon V Start stop display update V: 0=off % -- displayi and 'sub display N' Get current display text % -- dispinfoi and 'sub dispinfo N' Get some debug info % -- displayi and 'sub display N' Get current display text % -- dispinfoi and 'sub dispinfo N' Get some debug info