Pico infrared not transmitting correctly #5430
Replies: 1 comment
-
Posted at 2016-09-25 by ClearMemory041063 Try analogWrite(A5,0.5,{freq:35000}); Posted at 2016-09-25 by ClearMemory041063 This link might help. Note it uses a 0.9 duty cycle. http://www.espruino.com/Pico+Infrared Since you don't have a scope you might try this one liner to see the LED flashing. I did this one liner to flash the Green LED on a Pico. This is not PWM pin so you have to use the software PWM. PWM pins use the Timer peripherals built into the ARM chip. Posted at 2016-09-25 by Adam ahhh the duty cycle, that was my problem, thank you! I also had to replace the initial start value with 0.
Posted at 2016-09-26 by @gfwilliams Isn't the right frequency 38000 Hz? As @ClearMemory041063 said there's some example code at http://www.espruino.com/Pico+Infrared The start value will depend on which way you put the IR transmitter between the 2 pins :) It might also be handy to make the duty cycle 0.9 as in the example now you're pulling down to turn on. It means the LED is then only on for 10% of the time - which means you can use lower resistor values to drive it with more power without risking breaking it. Also I think it's closer to what the IR receivers expect. But hey, if it's working :) Also, for turning off, just try |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-09-25 by Adam
Hello,
I'm having some trouble getting infrared to correctly transmit from the Pico. Using the same PWM data (microseconds) and components I'm able to see it working using an arduino.
The Pico is running 1v87 and I was unable to get the Pico infrared example transmitting (receiving is working and also reads the same values as the arudino).
Minimal arduino sketch based on Arduino-IRremote
Pico code
Unfortunately I don't have an oscilloscope at hand to see what A5/A6 are actually outputting :(
Am I missing something obvious?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions