To Pete:
Does the built in LED blink as it should?
It does not work as well. It gives the same result.
Apparently, i did some further troubleshooting and find out the fault lies in my setInitialData() in the setup. The initialising of the setInitialData() somehow "freezes" all of the digital I/O pins. The LED blinking works without the setInitialData() setup code.
My full code is quite long, hence i will just post my setInitialData() setup code which causes the problem.
void setup() {
pinMode(LED, OUTPUT);
Andee.begin();
Andee.clear();
setInitialData(); // Define object types and their appearance
void setInitialData() {
UGVbutton1.setId(0);
UGVbutton1.setType(BUTTON_IN);
UGVbutton1.setLocation(0, 0, HALF);
UGVbutton1.setTitle("UGV 1");
UGVbutton1.setColor(LIGHT_SALMON);
UGVbutton1.setTextColor(BLACK);
UGVbutton1.requireAck(true);
UGVbutton2.setId(1);
UGVbutton2.setType(BUTTON_IN);
UGVbutton2.setLocation(0, 1, HALF);
UGVbutton2.setTitle("UGV 2");
UGVbutton2.setColor(LIGHT_SALMON);
UGVbutton2.setTextColor(BLACK);
UGVbutton2.requireAck(true);
tableButton1.setId(2);
tableButton1.setType(BUTTON_IN);
tableButton1.setLocation(2, 0, ONE_QUART);
tableButton1.setTitle("Table 1");
tableButton1.setColor(THEME_YELLOW);
tableButton1.setTextColor(BLACK);
tableButton1.requireAck(true);
tableButton2.setId(3);
tableButton2.setType(BUTTON_IN);
tableButton2.setLocation(2, 1, ONE_QUART);
tableButton2.setTitle("Table 2");
tableButton2.setColor(THEME_YELLOW);
tableButton2.setTextColor(BLACK);
tableButton2.requireAck(true);
tableButton3.setId(4);
tableButton3.setType(BUTTON_IN);
tableButton3.setLocation(2, 2, ONE_QUART);
tableButton3.setTitle("Table 3");
tableButton3.setColor(THEME_YELLOW);
tableButton3.setTextColor(BLACK);
tableButton3.requireAck(true);
tableButton4.setId(5);
tableButton4.setType(BUTTON_IN);
tableButton4.setLocation(2, 3, ONE_QUART);
tableButton4.setTitle("Table 4");
tableButton4.setColor(THEME_YELLOW);
tableButton4.setTextColor(BLACK);
tableButton4.requireAck(true);
tableButton5.setId(9);
tableButton5.setType(BUTTON_IN);
tableButton5.setLocation(2, 4, ONE_QUART);
tableButton5.setTitle("Table 5");
tableButton5.setColor(THEME_YELLOW);
tableButton5.setTextColor(BLACK);
tableButton5.requireAck(true);
tableButton6.setId(10);
tableButton6.setType(BUTTON_IN);
tableButton6.setLocation(2, 5, ONE_QUART);
tableButton6.setTitle("Table 6");
tableButton6.setColor(THEME_YELLOW);
tableButton6.setTextColor(BLACK);
tableButton6.requireAck(true);
tableButton7.setId(11);
tableButton7.setType(BUTTON_IN);
tableButton7.setLocation(2, 6, ONE_QUART);
tableButton7.setTitle("Table 7");
tableButton7.setColor(THEME_YELLOW);
tableButton7.setTextColor(BLACK);
tableButton7.requireAck(true);
tableButton8.setId(12);
tableButton8.setType(BUTTON_IN);
tableButton8.setLocation(2, 7, ONE_QUART);
tableButton8.setTitle("Table 8");
tableButton8.setColor(THEME_YELLOW);
tableButton8.setTextColor(BLACK);
tableButton8.requireAck(true);
tableButton9.setId(13);
tableButton9.setType(BUTTON_IN);
tableButton9.setLocation(2, 8, ONE_QUART);
tableButton9.setTitle("Table 9");
tableButton9.setColor(THEME_YELLOW);
tableButton9.setTextColor(BLACK);
tableButton9.requireAck(true);
tableButton10.setId(14);
tableButton10.setType(BUTTON_IN);
tableButton10.setLocation(2, 9, ONE_QUART);
tableButton10.setTitle("Table 10");
tableButton10.setColor(THEME_YELLOW);
tableButton10.setTextColor(BLACK);
tableButton10.requireAck(true);
sendButton.setId(6);
sendButton.setType(BUTTON_IN);
sendButton.setLocation(3, 0, HALF);
sendButton.setTitle("Send");
sendButton.setColor(THEME_GREY);
sendButton.setTextColor(BLACK);
sendButton.requireAck(true);
returnButton.setId(7);
returnButton.setType(BUTTON_IN);
returnButton.setLocation(3, 1, HALF);
returnButton.setTitle("Return");
returnButton.setColor(THEME_GREY);
returnButton.setTextColor(BLACK);
returnButton.requireAck(true);
locationStatus1.setId(8);
locationStatus1.setType(DATA_OUT);
locationStatus1.setLocation(1, 0, HALF);
locationStatus1.setTitle("Location Status 1");
locationStatus1.setData("Home");
locationStatus1.setTextColor(BLACK);
locationStatus2.setId(17);
locationStatus2.setType(DATA_OUT);
locationStatus2.setLocation(1, 1, HALF);
locationStatus2.setTitle("Location Status 2");
locationStatus2.setData("Home");
locationStatus2.setTextColor(BLACK);
}
To Tom:
I am quite sure that there is no problem with my hardware. The problem lies with the setup code above which i have posted.
These are the products that i am using:
Adafruit Motor Shield v2.3 : Adafruit Motor/Stepper/Servo Shield for Arduino v2 Kit [v2.3] : ID 1438 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits
Annikken Andee 2015 (android ver) : http://www.annikken.com/store/products/