This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int x, y, z; | |
| void setup() | |
| { | |
| Serial.begin(9600); // sets the serial port to 9600 | |
| } | |
| void loop() | |
| { | |
| x = analogRead(0); // read analog input pin 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define trigPin 13 | |
| #define echoPin 12 | |
| void setup() { | |
| Serial.begin (9600); | |
| pinMode(trigPin, OUTPUT); | |
| pinMode(echoPin, INPUT); | |
| } | |
| void loop() { | |
| long duration, distance; | |
| digitalWrite(trigPin, LOW); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * PIR sensor tester | |
| */ | |
| int ledPin = 13; // choose the pin for the LED | |
| int inputPin = 2; // choose the input pin (for PIR sensor) | |
| int pirState = LOW; // we start, assuming no motion detected | |
| int val = 0; // variable for reading the pin status | |
| void setup() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Wire.h> //*Include the Wire library which allows to use the I2C interface* | |
| #include <Adafruit_Sensor.h> | |
| #include <Adafruit_BME280.h> //*library to easily take readings from the sensor* | |
| #define SEALEVELPRESSURE_HPA (1013.25) | |
| Adafruit_BME280 bme; //*Declare the bpm variable, an easy to remember reference for the device* | |
| unsigned long delayTime; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int potentiometerPin = 0; | |
| int ledPin = 11; | |
| int potentiometerVal = 0; | |
| void setup() | |
| { | |
| Serial.begin(9600); // setup serial | |
| } | |
| void loop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * This example check if the firmware loaded on the WiFi101 | |
| * shield is updated. | |
| * | |
| * Circuit: | |
| * - WiFi101 Shield attached | |
| * | |
| * Created 29 July 2015 by Cristian Maglie | |
| * This code is in the public domain. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| FirmwareUpdate.h - Firmware Updater for WiFi101 / WINC1500. | |
| Copyright (c) 2015 Arduino LLC. All right reserved. | |
| This library is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU Lesser General Public | |
| License as published by the Free Software Foundation; either | |
| version 2.1 of the License, or (at your option) any later version. | |
| This library is distributed in the hope that it will be useful, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Web client | |
| This sketch connects to a website (http://www.google.com) | |
| using a WiFi shield. | |
| This example is written for a network using WPA encryption. For | |
| WEP or WPA, change the WiFi.begin() call accordingly. | |
| This example is written for a network using WPA encryption. For |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int led = 9; // the PWM pin the LED is attached to | |
| int brightness = 0; // how bright the LED is | |
| int fadeAmount = 5; // how many points to fade the LED by | |
| void setup() { | |
| // declare pin 9 to be an output: | |
| pinMode(led, OUTPUT); | |
| } | |