πŸ‡©πŸ‡°πŸ‡ΊπŸ‡ΈπŸ³οΈβ€πŸŒˆ he/him - Senior Engineer and Tech Lead on @Zendesk's Core Engineering team. Find me here: https://xitter.cf/t.co/YtI0GCRv8o

Copenhagen, Denmark
Joined March 2008
πŸš€ Let's explore Closures in #Ruby with a space-themed example! 🌌 #ThomasTip Closures are functions/methods that can be invoked from other functions or methods, while retaining access to variables from their original scope.
1
2
1
45
3,906
What we're looking at here is the first initialization instructions being sent from MicroPython (uPy) running on Raspberry Pi Pico (RPi Pico) through a PCF8574 8-bit I/O expander via I2C, to an HD44780 controlling a "1602" Dot Matrix LCD.🧡
1
1
4
273
So what is PB4 doing with data length? Setting it to 1, as we've done, tells the HD44780 that we're sending and receiving data in 8-bit lengths. Confusingly, we're sending in 4-bit lengths, but during initialization, we must use 8-bit mode and allow PB0-PB3 to be considered 0.
1
62
I reached the Twitter thread limit with this rabbit hole. It wasn't going anywhere in particular, so I appreciate you coming for the ride. If you've ever written drivers, I'd love to hear about your experience! I have no idea what I'm doing πŸ˜… xitter.cf/ThomasCountz/status/17…
What we're looking at here is the first initialization instructions being sent from MicroPython (uPy) running on Raspberry Pi Pico (RPi Pico) through a PCF8574 8-bit I/O expander via I2C, to an HD44780 controlling a "1602" Dot Matrix LCD.🧡
1
71