The first thing you will need is to download and install the LedControl Arduino library as it is essential for using the MAX7219. Code [c] #include “LedControl.h” // need the library LedControl lc=LedControl(12,11,10,1); // // pin 12 is connected …
-
-
In this example we use the ethernet shield again but this time we connect an RGB led to pins 6, 7 and 8 Code [c] #include <SPI.h> #include <Ethernet.h> #include <Servo.h> Servo myservo; // create servo object to control a …
-
This example requires an ethernet shield and an LED connected to pin 6. Copy the code into a new sketch and upload it to your arduino and then open your web browser to http://192.168.1.177 Code [c] #include <SPI.h> #include …
-
In this example we will add a DS18B20 temperature sensor and an SD card. We will then log the results of the sensor to a file on the SD Card called temp.txt. Layout Code You need to download 2 …
-
In this example we connect an SD card to our Arduino, we will log analog readings to a file on the SD card. Here is the layout Code [c] #include <SD.h> const int chipSelect = 4; void setup() { …
-
This was a simple example to show sending information using the serial monitor, in our other examples we have generally used the serial monitor for debug, outputting messages. This example basically switches on red, green or blue on a tri-color …
-
The MMA7455 accelerometer is a sensor that can measure acceleration in three axes. This sensor is commonly available as a breakout board that you can connect to your Arduino. It requires VCC, GND , SCA and SCL to be connected. …
-
This very simple sketch scans the I2C-bus for devices. If a device is found, it is reported to the Arduino serial monitor. Code [codesyntax lang=”cpp”] #include <Wire.h> void setup() { Wire.begin(); Serial.begin(9600); Serial.println(“\nI2C Scanner”); } void loop() { byte …
-
This water sensor is fairly easy to connect this to your Arduino, the requirements are simply VCC (5v), GND and then connect the SIG to one of the Analog pins. In our code example this will be Analog 0. …
-
In this example we look at how to connect an IR Reciever. Generally, they require Vcc(5v), GND and there is a data out which you connect to your Arduino. Here is a typical IR showing the pinout. Many electronic shops online …
-
This is a basic LCD voltmeter example YOU SHOULD NOT MEASURE MORE THAN 5v or reverse the polarity, you risk causing permanent damage to your Arduino I tested a 1.5v battery, the reading was 1.50v, using a multimeter I read …
-
The HMC5883L is a 3-axis magnetometer. The most common include usage of the chip is as a digital compass to sense direction or using them to detect ferrous metals. /* Analog input 4 I2C SDA Analog input 5 I2C SCL …
