Skip to content
Snippets Groups Projects
Commit 49efeeae authored by nikhil b lal's avatar nikhil b lal
Browse files

tuned parameters for BAOMAIN BM-0530B

parent c202f3f1
No related branches found
No related tags found
No related merge requests found
.DS_Store 0 → 100644
File added
......@@ -2,9 +2,9 @@ from machine import Pin, PWM, Timer
import time
# constants
spike_duration = 100 # spike duration, ms
pulse_duration = 1500 # dwell (including spike time), ms
total_cycle = 3000 # period of the cycle, ms
spike_duration = 3.5 # spike duration, ms
pulse_duration = 300 # dwell (including spike time), ms
total_cycle = 2000 # period of the cycle, ms
# establish pins
led_pin = Pin(27, Pin.OUT)
......@@ -14,10 +14,10 @@ sol_pin = Pin(29, Pin.OUT)
timer = Timer() # timer object
# initiate variables
i = 0.5 # counter increment, ms
i = 1 # counter increment, ms
counter = -i # counter, ms
duty = 0 # duty cycle, %
duty_percent = 12.5
duty_percent = 7
hold_duty = round(duty_percent/100*65535) # reduced duty cycle, %
# pwm object, off
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment