Andres Rodriguez
New Member
I am trying to control the speed of a motor using a Picaxe 08M connected to an Electronic Speed Control (ESC). The ESC responds to pulses the same way a servo does. Below is the code. And I attached the circuit schematic.
My question is about the values of R3 and R4. I am not sure if they are correct for what I am trying to do.
My question is about the values of R3 and R4. I am not sure if they are correct for what I am trying to do.
Code:
#picaxe 08M
'Pin assignement
Symbol Volt_in= Input2
Symbol Ser_out= 1
Symbol Pulse_out= 4
'Variables
Symbol Volt_read = W0
Symbol Signal = W1
; *******************************
High 1 ' Tx Pin is idle for some time
Pause 4000 ' wait for LCD to boot
SerOut 1, T2400, ("?G420") ' configure LCD as 4 X 20
SerOut 1, T2400, ("?f") ' clear the LCD and home the cursor
SerOut 1,T2400, ("?B70") ' Set backlight
Pause 100
Main:
readadc10 2,Volt_Read
w1=w0 Min 75 Max 225
Pulsout 4,Signal
SerOut 1, T2400, ("?f")
Serout 1,T2400, (#Signal)
Goto Main
Attachments
-
17.3 KB Views: 47
Last edited: