Sadly the charger for the internal battery is only getting the cap up to 2.7v
And my pwm function is kinda limited
Code:
pwm
Syntax:
PWM pin,duty,cycles
- Pin is a variable/constant (1-4) which specifies the i/o pin to use.
- Duty is a variable/constant (0-255) which specifies analog level.
- Cycles is a variable/constant (0-255) which specifies number of cycles. Each cycle takes about 5ms.
Function:
Output pwm then return pin to input.
Information:
This command is rarely used. For pwm control of motors etc. the pwmout command is recommended instead. This pwm command is used to provide ‘bursts’ of PWM output to generate a pseudo analogue output on the PICAXE-08/08M (pins 1, 2, 4). This is achieved with a resistor connected to a capacitor connected to ground; the resistor- capacitor junction being the analog output. PWM should be executed periodically to update/refresh the analog voltage.
Example:
main:
pwm 4,150,20 ‘ send 20 pwm bursts out of pin 4
pause 20 ‘ pause 20 ms
goto main ‘ loop back to start
And the pwmout command can only be used on pin 2, which is not easily unsoldered.
I currently have it at pwm,0,255,10. I don't really understand what duty is, at anything under 200 there is a whining noise, and under 75 it wont even move.