CC3000 WiFi chip
To see if your WiFi chip is correctly wired and operational, I recommend to use the test sketches that come with the Adafruit library that you need to get from GitHub. I used for example the one called WebClient. Just open it from the library’s folder, and save it to a new file (you need to be able to modify the sketch to enter your WiFi network name & password).Then, modify the sketch with the correct data for you WiFi network, and upload to the board. You can then open your serial monitor, and if everything was wired correctly (and your Internet connection is working!) you should see your Arduino connecting to the web, then connecting to the Adafruit’s website, and printing some information:
DHT11 sensor
To use the DHT11 sensor, you need to download the corresponding library first and put it into your /libraries folder inside your Arduino folder. You can use the following sketch to test the DHT11 sensor, update it for DHT22 or AM2302 if you end up using one of those instead// Include required libraries #include <SPI.h> #include <string.h> #include "DHT.h" // DHT11 sensor pins #define DHTPIN 7 #define DHTTYPE DHT11 // DHT instance DHT dht(DHTPIN, DHTTYPE); void setup(void) { // Initialize DHT sensor dht.begin(); Serial.begin(115200); } void loop(void) { // Measure the humidity & temperature float h = dht.readHumidity(); float t = dht.readTemperature(); // Transform to String String temp = String((int) t); String hum = String((int) h); Serial.print("Temperature: "); Serial.println(temp); Serial.print("Humidity: "); Serial.println(hum); Serial.println(""); }