Thomas Countz 🤍

2.3K posts

Thomas Countz 🤍

Thomas Countz 🤍

@ThomasCountz

🇩🇰🇺🇸🏳️‍🌈 he/him - Senior Engineer and Tech Lead on @Zendesk's Core Engineering team. Find me here: https://t.co/YtI0GCRv8o

Copenhagen, Denmark Katılım Mart 2008
518 Takip Edilen539 Takipçiler
Sabitlenmiş Tweet
Thomas Countz 🤍
Thomas Countz 🤍@ThomasCountz·
🚀 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.
Thomas Countz 🤍 tweet media
English
1
2
45
3.9K
Thomas Countz 🤍
Thomas Countz 🤍@ThomasCountz·
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.🧵
Thomas Countz 🤍 tweet media
English
1
0
4
267
Thomas Countz 🤍
Thomas Countz 🤍@ThomasCountz·
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 😅 twitter.com/ThomasCountz/s…
Thomas Countz 🤍@ThomasCountz

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.🧵

English
1
0
0
69
Thomas Countz 🤍
Thomas Countz 🤍@ThomasCountz·
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.
Thomas Countz 🤍 tweet media
English
1
0
0
60