Gronk Flashcards
How to display an image, eg happy face
display.show(Image.HAPPY)
How to scroll text
display.scroll(‘Fiiiiiiich!’)
How to display 2 images after one another
display.show(Image.GIRAFFE)
sleep(2000)
display.show(Image.DUCK)
How to send a radio message
import radio
radio.on()
radio.send(‘Fish5Life’)
How to loop an image?
Add while True:
How to receive a scroll message?
radio.on()
while True:
message = radio.receive()
if message:
display.scroll(message)
How to set a channel for the radio and how to log in?
radio.on()
radio.config(channel=7)
radio.send(“Hi!”)
To log in, just radio.send(username:password)
How to snoop passwords?
radio.config(channel=42)
radio.on()
while True:
msg=radio.receive()
if msg:
display.scroll(msg)
display.show(Image.GHOST)
What is the code for buttons?
if button_a.was_pressed():
if button_b.was_pressed():
Always add while True:
How to add addresses?
Just add A: to a message
How to log in on multiple devices?
PASSWORD_A = ‘n8KZmCAQ’
PASSWORD_B = ‘d9W2hrDJ’
radio.on()
while True:
if button_a.was_pressed():
msg = (‘A:’) + PASSWORD_A
radio.send(msg)
if button_b.was_pressed():
msg = (‘B:’) + PASSWORD_B
radio.send(msg)
How to listen to any message without the destination?
while True:
msg = radio.receive()
if msg:
destination, msg = msg.split(“:”)
display.scroll(msg)