''' Student Mental Health Check-in Program This teacher version uses the radio to communicate directly with the teacher. Add and modify a few lines of code for direct communication. ''' import radio from codex import * # Turn on the radio and set the channel radio.on() radio.config(channel=6) # Beginning message indicates the CodeX is ready display.print("ON", color=GREEN) # Menu of moods display.print("Menu of moods") display.print() display.print("Up = I'm Great", color=DARK_GREEN) display.print("Down = I'm Okay", color=GREEN) display.print("Left = I'm meh", color=CYAN) display.print("Right = Struggling", color=ORANGE) display.print("A = Frustrated", color=PURPLE) display.print("B = Overwhelmed!", color=RED) while True: if buttons.was_pressed(BTN_B): # Let student know you received the message. radio.send("Heard") display.clear() # Receive message from student and display color on your screen. msg = radio.receive() if msg: if msg == "U": display.fill(DARK_GREEN) elif msg == "D": display.fill(GREEN) elif msg == "L": display.fill(CYAN) elif msg == "R": display.fill(ORANGE) elif msg == "A": display.fill(PURPLE) elif msg == "B": display.fill(RED)