''' Student Mental Health Check-in Program This student 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) # Menu of moods def menu(): 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) # -- Main -- menu() while True: # Feeling great if buttons.was_pressed(BTN_U): display.fill(DARK_GREEN) radio.send("U") # Feeling okay if buttons.was_pressed(BTN_D): display.fill(GREEN) radio.send("D") # Feeling meh if buttons.was_pressed(BTN_L): display.fill(CYAN) radio.send("L") # Struggling if buttons.was_pressed(BTN_R): display.fill(ORANGE) radio.send("R") # Frustrated if buttons.was_pressed(BTN_A): display.fill(PURPLE) radio.send("A") # Overwhelmed if buttons.was_pressed(BTN_B): display.fill(RED) radio.send("B") msg = radio.receive() if msg: display.clear() display.print(msg, scale=3) print() menu()