GPIO Pinouts? #75
-
|
am I correct in that the I'm looking for info on the pinouts of the buttons and the LED lights and I can't seem to find anything on here. They are named in the badgerware IO, but I dont see them mapped to any GPIO anywhere. Is that code closed source? Can you provide a list of the pinouts? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
|
Similarly, is there any data on the UART on the side of the badge? The 3.3v is outputting power but I don't see any activity on the GPIO pins between power and ground. |
Beta Was this translation helpful? Give feedback.
-
|
I think the pins on the side are bitstream - not typical UART I had to write a class to do send LED pixel data for my video https://www.youtube.com/watch?v=_jPm_zN95FE import time
from machine import Pin, bitstream
class NeoPixel:
"""
NeoPixel driver using bitstream (bit-banging) for GPIO pins > 29
that are not accessible by PIO.
"""
def __init__(self, pin, n, bpp=3, timing=1):
self.pin = Pin(pin, Pin.OUT)
self.n = n
self.bpp = bpp
self.buf = bytearray(n * bpp)
self.timing = timing
def __setitem__(self, i, color):
# Store color in GRB order (WS2812 format)
offset = i * self.bpp
self.buf[offset] = color[1] # Green
self.buf[offset + 1] = color[0] # Red
self.buf[offset + 2] = color[2] # Blue
def __getitem__(self, i):
offset = i * self.bpp
return (self.buf[offset + 1], self.buf[offset], self.buf[offset + 2])
def fill(self, color):
for i in range(self.n):
self[i] = color
def write(self):
# Use bitstream for bit-banging WS2812 protocol
# WS2812 timing: (high_time_0, low_time_0, high_time_1, low_time_1) in nanoseconds
# WS2812: 0 = 400ns high + 850ns low, 1 = 800ns high + 450ns low
bitstream(self.pin, 0, (400, 850, 800, 450), self.buf)
time.sleep_us(60) |
Beta Was this translation helpful? Give feedback.
-
|
Oh thanks, that makes sense! |
Beta Was this translation helpful? Give feedback.
-
|
The Pimoroni team did all the hard work on the final UF2. With supply chain delays we were cutting it close to the wire. The plan is for the badgeware stuff to be open like all the Pimoroni code is but they are still working on some stuff to get their retail version of the Tufty 2350 out the door (they very kindly delayed the release of that to help work on the Universe badge) But to your point about GPIO pins, let me get a comprehensive list together and post back. |
Beta Was this translation helpful? Give feedback.
-
|
Hey all! We're just mopping up a few bits and pieces before releasing the firmware source but it won't be long now. In the meantime here's the pin assignments:
Other pins are generally used by the wireless module, LCD, QSPI flash, etc. Hope that helps! |
Beta Was this translation helpful? Give feedback.
Hey all! We're just mopping up a few bits and pieces before releasing the firmware source but it won't be long now.
In the meantime here's the pin assignments:
0..3: LEDs on badge rear4&5: I2C SDA and SCL6..10: User buttons: DOWN, A, B, C, UP11: VBUS detect12: Charging status13: RTC alarm14: RESET switch (used to implement the long press, double tap functions)15: Button press INT (used to wake badger on button presses)20&21: IR sensor TX & RX22: HOME button40: VBAT sense41: Power rail enable43Light sensor44..47extension headerOther pins are generally used by the wireless module, LCD, QSPI flash, etc.
Hope that helps!