I am having trouble creating my switch debounce(pin) function for #Arduino. I found code that works great as a mainline, but can not seem to get it to work when I massage it into a function. I have several push buttons I need to debounce when pressed.
I tripped over an interesting thing with #Arduino stuff. If you want to do BOTH analogWrite(pin, value) and digitalWrite(pin, [HIGH | LOW]), you MUST do pinMode(pin, OUTPUT) when the analogWrite() stuff is done.
I added interrupts for button pressed to the #Arduino version of my mesh network node sketch. Now, a flag gets set as soon as a button is pressed. Then, it gets processed in the main line, and the flags get reset.
This is the base circuit and #Arduino sketch for two other projects I want to work on. It can not run on a regular 8-Bit Arduino because it requires more flash and memory than those chips have.
It is a portable thermometer that displays temperature (both F and C) and humidity on a matrix display. This will run on any Feather M0 board or greater, because it is over 35Kb now.
This is one of those days when I do not understand why my #Micropython code is working. It might be interesting to do an #Arduino version of my script.
I did what I think is a direct port of a library from #Arduino to #Micropython, but am not getting the same results in the ported version. I think this is because Micropython does not have pin change interrupts - just rising and falling edge.
It seems that the #Arduino library I have been working to port to #Micropython has some problems, even though it does work. I still can not get my port of it to work right.
@unixb0y Good woik there! :) I have been neck deep in an FSM. I am attempting to port a working #Arduino library to #Micropython. My states are all wonky! I need to add some Serial.println() to the Arduino library to find out what is going on inside there.
Success in getting this sucker to work... 😁 SPI kind of sucks but I’m getting the hang of it.. ^^ It was a good decision to start controlling it with #Arduino first and then making a #Verilog implementation for it afterwards :)