Here is my fork: https://github.com/luckybroman5/source
Clone, startup docker, then:
# cd /root/source/c-cross-compile-example // https://github.com/OnionIoT/c-cross-compile-example
# sh xCompile.sh --buildroot /root/source/ --lib ugpio
Here is my fork: https://github.com/luckybroman5/source
Clone, startup docker, then:
# cd /root/source/c-cross-compile-example // https://github.com/OnionIoT/c-cross-compile-example
# sh xCompile.sh --buildroot /root/source/ --lib ugpio
Hi @Lazar-Demin,
It's probably worth mentioning the linux distro as well. I have came at this from a lot of different angles:
Onion's Docker on Windows
Ubuntu 16 VM Windows Host machine
Onion's Docker on Ubuntu 16 VM Windows Host machine
Onion's Docker on Centos 7 (Eventually worked!)
From what I saw in my debugging there was a 502 timeout when trying to download the libwebsockets dependency, therefor failing the build.
My fix was no different than the aforementioned, but my question to you is that worth a PR to GH repo? I can submit mine.
Thank you kindly,
-- Kade
@Andrew-Moore Hey!
Funny thing as I have done the exact same thing in nodejs.. Turns out I have the same issue.
I put it on my scope and I can see that there are periods in between the changes to the duty cycle that are not consistent lengths, and are either high or low.
This is because you and I are switching the duty cycles very inefficiently. A better way to do this would be to either compile the fast-gpio cpp library and import it as some sort of module directly, OR use some other hardware.
After giving it some thought I think I'm going with an arduino to do the actual PWM signal, and have the onion act as a form of controller. My PWM duty cycle was set at 50% and the Freq was at 2khz. On the scope I was getting +- 5% at ~ 1400 - 1600 khz.
The software solution here would be a bit of pain, and even after all that effort it'd still be software PWM.
Looking forward to hearing your solution !