have the new Arduino Zero (Team CC). Whenever I add
#include <WiFi.h>
my code stops executing. I believe the issue may have to do with some code being automatically run in the "header-tree" that is Wifi.h I would like to use this library to get my wifi-shield running.
The following code works:
// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 3; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
int count = 0;
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
Serial.begin(9600);
}
void loop() {
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on:
count++;
digitalWrite(ledPin, HIGH);
Serial.println(count);
delay(100);
}
else {
// turn LED off:
digitalWrite(ledPin, LOW);
}
}
However after adding that include Wifi.h the project will compile and run but no code actually gets executed.
Also asked at: http://stackoverflow.com/questions/31257009/arduino-zero-with-wifi-h