tinygo-org / tinygo

Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
https://tinygo.org
Other
15.52k stars 914 forks source link

Modified tm1637 driver #3082

Closed placessweden closed 2 years ago

placessweden commented 2 years ago

I just couldn't get the tm1637 driver to work on any board but Arduino Uno (AVR). After much headscratching I came up with a modified version, where the dio and clk pins are not bidirectional but only configured as output, then using High() and Low(). I also modified the way bits are masked i method writeByte(). I've tested the code on RPI Pico, Trinket-M0, Sipeed Maix Bit and Arduino Uno. Code and diff: https://github.com/placessweden/Modified-tm1637-for-TinyGo

deadprogram commented 2 years ago

Wouldn't this be better off in the Drivers repo? https://github.com/tinygo-org/drivers/issues

placessweden commented 2 years ago

Probably, but I'm a rookie and don't know how to commit - and have only had a GitHub account for 23 hours now :)

deadprogram commented 2 years ago

IN any case, please open an issue in that repo. Thanks! Now closing.