#![no_std]
#![no_main]
/* Variables needed (potentially) */
// led_time_on variable -> random number between 500ms - 1500ms
// led_interval_time variable -> random number between 1s - 5s
// response_time variable -> time it took the user to press the button since the light turned on
// best_time variable -> smallest amount of time the user took to press the button
// Button_Pin (GPIO_2)
// LED_Pin (GPIO_9)
// Timer Group
// Timer from timer group
// Functions needed (potentially)
// fn calculate_response_time() -> returns the response time of the user
/* ISR (if needed) */
// Maybe interrupt when the button is pressed (stop led blinking, record response time)
/***********************************************************************************************************
// Crate Imports
***********************************************************************************************************/
use esp_backtrace as _;
use esp_hal::
{
prelude::*,
peripherals::TIMG0,
delay::MicrosDurationU64,
timer::timg::{TimerGroup, Timer, Timer0},
gpio::{Event, Input, Pull, Io, Level, Output},
interrupt::Priority,
};
use esp_println::println;
use core::cell::{Cell, RefCell};
use critical_section::Mutex;
use rand::{Rng, SeedableRng};
use rand::rngs::SmallRng;
#[entry]
fn main() -> !
{
/***********************************************************************************************************
// Peripheral Configuration //
***********************************************************************************************************/
// Take Peripherals
let peripherals = esp_hal::init(esp_hal::Config::default());
loop
{
}
}