davidbuckley.net |
home > RoboNova > RoboNova Log | 5 February 2015 |
Adding the resistors
Added the two resistors missing resistors but it doesn't really work.
The reason the resistors are not included on the C3024 board is the circuit doesn't work!
By the time the voltage drops to 5.8v the regulator has run out of headroom and the processor voltage starts to drop so the test only just works, sometimes!
'2008-08-11 RNControl_DB-1.bas '2008-08-10 rewritten with command pages, (cmndpage) '2008-08-07 Squat walk added, getup flag added, tilt sensor added07 August 2008
'2008-07-29 GOSUB standard_pose put after GetCmnd and removed from K1..... '2008-07-06 amended code at '== Action command check' to (48 - 80), oops '2008-05-26 rewrote main loop and added 'local' variable loop counters and flags '2008-05-25 keys keys F(23) and G(32) are wrong, should be F(32) and G(23) - see RoboRemocon ' added FastTurnLeft, Run, FastTurnRight on EFG ' changed blink to Remocon, and commented robot_voltage
'2006-07-09 robot_voltage: ' missing ENDIF before RETURN ' maximum AD(6) is 88 on fully charged battery ' not 148 as in original code ' test set at 80 as quite quickly 88 is too high '2006-07-09 MAIN: added LED blink in so we can tell when robot is ready to receive IR cmnds ' OUT 52,1 'blue LED OFF ' GOSUB robot_voltage ' GOSUB robot_tilt ' OUT 52,0 'blue LED ON
Looking at the 'Overall Tempate Program(Version 1.00 20051115).bas' it was easy to see why.
The low voltage battery test was always being done because
Now the response to the IR controller was snappy. But RoboNova still wasn't responsive during moves so I added a couple of lines in MAIN: to blink the blue LED to let me know when RoboNova was ready for a new command.
Original code
'================================================ robot_voltage: ' [ 10 x Value / 256 = Voltage] DIM v AS BYTE A = AD(6) IF A < 148 THEN ' 5.8v FOR v = 0 TO 2 OUT 52,1 DELAY 200 OUT 52,0 DELAY 200 NEXT v RETURN '================================================
My modified code
'================================================ robot_voltage: ' [ 10 x Value / 256 = Voltage] DIM v AS BYTE A = AD(6) IF A < 80 THEN ' 148=5.8v FOR v = 0 TO 2 OUT 52,1 DELAY 200 OUT 52,0 DELAY 200 NEXT v endif RETURN '================================================
Blink blue LED in MAIN:
'================================================ MAIN: OUT 52,1 'blue LED OFF GOSUB robot_voltage 'GOSUB robot_tilt OUT 52,0 'blue LED ON
I also added a history section for code modifications.
'----------------------------- 'History '2006-07-09 robot_voltage: ' missing ENDIF before RETURN ' maximum AD(6) is 88 on fully charged battery ' not 148 as in original code ' test set at 80 as quite quickly 88 is too high '2006-07-09 MAIN: added LED blink in so we can tell when robot is ready to receive IR cmnds ' OUT 52,1 'blue LED OFF ' GOSUB robot_voltage ' GOSUB robot_tilt ' OUT 52,0 'blue LED ON '================================================