#![no_std]
#![allow(non_upper_case_globals)]
#[allow(unused_imports)]
use arduboy_rust::prelude::*;
#[allow(dead_code)]
const arduboy: Arduboy2 = Arduboy2::new();
#[no_mangle]
pub unsafe extern "C" fn setup() {
arduboy.begin();
arduboy.set_frame_rate(30);
arduboy.clear();
serial::begin(9600)
}
#[no_mangle]
#[export_name = "loop"]
pub unsafe extern "C" fn loop_() {
if !arduboy.next_frame() {
return;
}
if serial::available() > 0 {
let incoming_byte = serial::read_as_utf8_str();
serial::print("I received: \0");
serial::println(incoming_byte);
}
if arduboy.pressed(A) {
serial::println("kekw\0")
}
arduboy.display();
}