Commit af4624ea authored by johanwaa's avatar johanwaa

Endret farge, og forenklet, funker uten can. Brukt på robowars 2.3.2018

parent 8841bd51
......@@ -65,6 +65,7 @@ void setup()
FastLED.addLeds<NEOPIXEL,9>(leds, NUM_LEDS);
//Initialize can-bus
/*
Serial.println("CAN init");
while(!CAN_init()){
_delay_ms(50);
......@@ -72,16 +73,17 @@ void setup()
canErrorLed();
//board_toggleLed(LED0); //Toggle led to show can error
}
*/
//board_setLed(LED0, ON); //Finished initializing turn on LED0
//Initialize CAN receive struct
CAN_init_message_struct(&can_msg_received); //Initialize the memory
//CAN_init_message_struct(&can_msg_received); //Initialize the memory
//Initialize CAN send struct
CAN_init_message_struct(&can_msg_send); //Initialize memory
//CAN_init_message_struct(&can_msg_send); //Initialize memory
// Enable global interrupts
sei();
......@@ -147,9 +149,9 @@ void loop()
switch (state){
case IDLE:
if(sensor > THRESHOLD){
colorWipe(213, 255, brigthness, 0);
colorWipe(0, 255, brigthness, 10);
}else{
colorWipe(42, 255, brigthness, 0);
colorWipe(213, 255, brigthness, 0);
}
if(message == "arm"){
state = ARMED;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment