Skip to content

tangowhisky37/ArduinoProjects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArduinoProjects

A collection of all my Arduino Projects

Important Links -

Simple Blink LED's (https://github.com/tangowhisky37/ArduinoProjects/tree/master/Blink_LEDs)

  • This program simply blinks LED's (Blink_LEDs/Blink3LEDs)
  • Connections for this circuit include :
    • Connect the Digital pins on the Arduino to the LED.
    • On the MEGA 2560, D0 is Rx0 and D1 is Tx0. You will need to use D2 onwards.
    • A sample connection would include - D2 to Anode (Longer leg), 50 Ohm Resistor in line with Anode.
    • Cathode (Shorter leg) connects to the ground rail on the Breadboard.
    • You can use a Male to Male cable to connect the Arduino Ground, to the Ground rail on the Breadboard.
    • Connect up as many LED's you want to connect. Use different colors.
  • Hardware required includes :
    • Arduino MEGA 2560 R3 (You can choose your own version of the Arduino)
    • Coloured LED's
    • Breadboard for building the circuit
    • Dupont Male to Male wires
    • 50 Ohm Resistors
  • Software required includes :

Blink LED's while reading data from Analog Sensors (https://github.com/tangowhisky37/ArduinoProjects/tree/master/Blink_LEDs)

  • This program simply blinks LED's and displays data from Analog Sensors on the Serial Monitor
  • Connections for this circuit include :
    • Connect the Digital pins on the Arduino to the LED.
    • On the MEGA 2560, D0 is Rx0 and D1 is Tx0. You will need to use D2 onwards.
    • A sample connection would include - D2 to Anode (Longer leg), 50 Ohm Resistor in line with Anode.
    • Cathode (Shorter leg) connects to the ground rail on the Breadboard.
    • You can use a Male to Male cable to connect the Arduino Ground, to the Ground rail on the Breadboard.
    • Connect up as many LED's you want to connect. Use different colors.
    • Connect up the Analog sensors you might have. In this case I've used the following sensors -
    • Soil Moisture Sensor, Alcohol Sensor and LDR Sensor. Follow the connection diagrams for your sensors.
    • Please connect up the relevant Analog sensors to the available Analog ports and change code accordingly.
  • Hardware required includes :
    • Arduino MEGA 2560 R3 (You can choose your own version of the Arduino)
    • Coloured LED's
    • Breadboard for building the circuit
    • Dupont Male to Male wires
    • 50 Ohm Resistors
    • Analog Alcohol Sensor
    • Analog LDR or Light Dependant Resistor Sensor (LDR)
    • Analog Soil Moisture Sensor
  • Software required includes :

Display Simple Web Page (https://github.com/tangowhisky37/ArduinoProjects/tree/master/Ethernet/DummyWebPagev0.11)

Obtain DHCP lease with DNS and accept Web Requests (https://github.com/tangowhisky37/ArduinoProjects/tree/master/Ethernet/EthernetDemoUsingDhcpDnsv0.11)

Obtain data from sensors and display on Web Page (https://github.com/tangowhisky37/ArduinoProjects/tree/master/Ethernet/WebPageWithSensorData)

  • This program uses the Ethernet Addon based on enc28j60, obtains data from on-board sensors and displays values over a web page
  • I configured my Raspberry Pi as a DHCP server using ISC DHCP and provided the Arduino MEGA 2560 R3 a lease over ethernet.
  • Connections for this circuit include :
    • Connections between the Enc28j60 and Arduino MEGA 2560 R3 are as follows :
      • Enc2860 Ground connected to Ground on the Arduino MEGA 2560 R3
      • Enc2860 3.3v connected to 3.3v on the Arduino MEGA 2560 R3
      • Enc2860 SO connected to D50 (Pin 50) on the Arduino MEGA 2560 R3
      • Enc2860 SI connected to D51 (Pin 51) on the Arduino MEGA 2560 R3
      • Enc2860 SCK connected to D52 (Pin 52) on the Arduino MEGA 2560 R3
      • Enc2860 CS connected to D53 (Pin 53) on the Arduino MEGA 2560 R3
    • Connect the Digital pins on the Arduino to the LED.
    • On the MEGA 2560, D0 is Rx0 and D1 is Tx0. You will need to use D2 onwards.
    • A sample connection would include - D2 to Anode (Longer leg), 50 Ohm Resistor in line with Anode.
    • Cathode (Shorter leg) connects to the ground rail on the Breadboard.
    • You can use a Male to Male cable to connect the Arduino Ground, to the Ground rail on the Breadboard.
    • Connect up as many LED's you want to connect. Use different colors.
    • Connect up the Analog sensors you might have. In this case I've used the following sensors -
    • Soil Moisture Sensor, Alcohol Sensor and LDR Sensor. Follow the connection diagrams for your sensors.
    • Please connect up the relevant Analog sensors to the available Analog ports and change code accordingly.
  • Diagram -
  • Hardware required includes :
    • Arduino MEGA 2560 R3 (You can choose your own version of the Arduino)
    • Addon board based on Enc28j60 (http://www.ebay.com/bhp/enc28j60-module)
    • Breadboard for building the circuit
    • 50 Ohm Resistors
    • Dupont Male to Male wires
    • Dupont Female to Male wires
    • Analog Alcohol Sensor
    • Analog LDR or Light Dependant Resistor Sensor (LDR)
    • Analog Soil Moisture Sensor
  • Software required includes :
  • Articles to read :

Blink lights on the NodeMCU ESP8266 board (https://github.com/tangowhisky37/ArduinoProjects/tree/master/Nodemcu_Geekcreit/BlinkLights/Blink_v0_11)

NodeMCU - Identify MAC Addres, Connect to a wireless network and blinks lights(Source code at https://github.com/tangowhisky37/ArduinoProjects/tree/master/Nodemcu_Geekcreit/ObtainMACAddress/Get_MAC_Address_v0.11)

  • The NodeMCU board is one among the many ESP8266 boards out there but with a bit of a difference.
  • This board is affordable, connects to a USB port of your machine, is breadboard friendly and most importantly works with the Arduino IDE.
  • When working with NodeMCU boards one of the initial challenges is configuring your wireless router to allow the NodeMCU board to speak to it.
  • Most routers (including mine at home) use whitelisting or a MAC address list to allow a set of endpoints to connect to it. This is more for purposes of security than anything else.
  • If this is the case with you as well, you will need to know the MAC address of the NodeMCU board to be able to configure the Wireless AP (Access Point) to allow your NodeMCU board to connect to it.
  • Usually this is something you would only do once when you get started with any new NodeMCU board. This simple tutorial includes connecting the NodeMCU board to your machine, setting up the Arduino IDE interface and flashing the board with the code provided.
  • Once you've flashed the board, open up the Serial monitor window in your Arduino IDE. Hit the re-set button on the NodeMCU to get the board to reboot.
  • With the board booting up you should now see the MAC address for your new NodeMCU board on the Arduino IDE serial monitor.
  • Now's the opportunity to add the MAC address for the new NodeMCU board onto the whitelist of your wireless router. Once you've done that go back to your NodeMCU.
  • Reset the board using the re-set button on the NodeMCU with the Arduino Serial Monitor open. You should now see the NodeMCU obtaining a DHCP lease from your wireless router.
  • The sketch involved causes the light on the NodeMCU board to blink.
  • Connections for this circuit include -
  • Connecting the NodeMCU board to the USB port of your development machine
  • Software required includes -
  • Arduino IDE
  • ESP8266 libraries packes into the Arduino IDE which include the packages for NodeMCU board
  • Here are some of the links you might want to refer to with regards to configuring the Arduino IDE for ESP8266 development :
  • Hardware required includes :
  • 1 x NodeMCU board
  • Links for purchase :
  • http://www.banggood.com/Geekcreit-Doit-NodeMcu-Lua-ESP8266-ESP-12E-WIFI-Development-Board-p-985891.html
  • http://www.nodemcu.com

IoT (Internet Of Things) Web Server using the NodeMCU ESP8266 board (https://github.com/tangowhisky37/ArduinoProjects/tree/master/Nodemcu_Geekcreit/Web_Server)

IoT (Internet Of Things) Soil Moisture Sensor that Tweets using NodeMCU with ESP8266 v1 (https://github.com/tangowhisky37/ArduinoProjects/tree/master/Nodemcu_Geekcreit/ThingSpeakDataUpload/ThinkgSpeakDataUpload_v014)

  • The NodeMCU board is one among the many ESP8266 boards out there but with a bit of a difference.
  • This board is highly affordable (costs around 8-10 AUD), connects to a USB port of your machine, is breadboard friendly and most importantly works with the Arduino IDE.
  • As part of this program you will connect to the local wireless network, read values from the Soil moisture sensor and tweet the values.
  • The code also uses the Thingspeak Arduino library to upload data points to ThingSpeak and view graphically the data being logged.
  • To get this program working you will need the credentials for a local wireless network so that you can connect to it.
  • You will need to setup an account at www.thingspeak.com, create a channel and setup it up so that you can write to the channel using your NodeMCU.
  • You will then need to head off and setup a Twitter account at www.twitter.com and configure the thingtweet application.
  • The thingtweeet application (https://thingspeak.com/apps/thingtweets) requires that you register your Twitter account with Thingspeak. Here's a summary of the steps involved. Please refer to the details at the Thingspeak website. -
    • Sign in to https://thingspeak.com/login, select Apps from the menu, and then click on ThingTweet.
    • Under the ThingTweet App, select “Link new Twitter account”.
    • This will redirect you to Twitter to see if you want the app to have the ability to access your account.
    • You can Allow or Deny the process. Once you have confirmed the right Twitter account, Twitter will send you back to ThingSpeak.
    • The app generates a ThingTweet API Key for you to use. If you send an HTTP POST with your ThingTweet API Key, then the message will be relayed to Twitter.
    • All of the parameters from the Twitter API (statuses/update) are possible including geolocation.
  • Over the coming weeks (or months..as and when i can find time) I will update the code such that it only tweets when certain conditions are met.
  • Currently the code tweets every 5 minutes
  • Connections for this circuit include -
  • Connecting the NodeMCU board to the USB port of your development machine
  • Software required includes -
  • Diagram -
  • Hardware required includes :

IoT (Internet Of Things) Soil Moisture Sensor that Tweets & Emails using NodeMCU with ESP8266 v2 (https://github.com/tangowhisky37/ArduinoProjects/tree/master/Nodemcu_Geekcreit/ThingSpeakDataUpload/ThinkgSpeakDataUpload_v018)

  • Changes compared to v1 are -
    • Alerts sent over email (gmail)
    • Use of a Single Channel Optoisolator Relay (Shunyu SH-05VDC)
  • The NodeMCU board is one among the many ESP8266 boards out there but with a bit of a difference.
  • This board is highly affordable (costs around 8-10 AUD), connects to a USB port of your machine, is breadboard friendly and most importantly works with the Arduino IDE.
  • As part of this program you will connect to the local wireless network, read values from the Soil moisture sensor, tweet the values and also send yourself alerts over email.
  • This version of the Soil Moisture Sensor program uses the Thingspeak Arduino library to upload data points to ThingSpeak and view graphically the data being logged.
  • Email alerts are based on an assessment of how low the moisture in the soil is. This is a configurable value and while I've set this to 100 you can change this to any other value that works for your setup at home.
  • To get this program working you will need the credentials for a local wireless network so that you can connect to it.
  • You will need to setup an account at www.thingspeak.com, create a channel and setup it up so that you can write to the channel using your NodeMCU.
  • You will then need to head off and setup a Twitter account at www.twitter.com and configure the thingtweet application.
  • The thingtweeet application (https://thingspeak.com/apps/thingtweets) requires that you register your Twitter account with Thingspeak. Here's a summary of the steps involved. Please refer to the details at the Thingspeak website. -
    • Sign in to https://thingspeak.com/login, select Apps from the menu, and then click on ThingTweet.
    • Under the ThingTweet App, select “Link new Twitter account”.
    • This will redirect you to Twitter to see if you want the app to have the ability to access your account.
    • You can Allow or Deny the process. Once you have confirmed the right Twitter account, Twitter will send you back to ThingSpeak.
    • The app generates a ThingTweet API Key for you to use. If you send an HTTP POST with your ThingTweet API Key, then the message will be relayed to Twitter.
    • All of the parameters from the Twitter API (statuses/update) are possible including geolocation.
  • A set of template Gmail SMTP libraries are provided in the same folder as the Arduino code. Download those libraries.
    • Once you've synced the changes into your local git repo let's start by editing the gsender.h file.
    • The gsender.h file should be modified to include your email address, your password.
    • The email address and password however need to be provided in Base64 format.
    • To convert your gmail (email) address and password into Base64 format you might consider using - https://www.base64encode.org/
    • For details on configuring your Gmail account to allow use by external applications please refer to - https://www.instructables.com/id/ESP8266-GMail-Sender/
  • Over the coming weeks (or months..as and when i can find time) I will update the code such that it only tweets when certain conditions are met.
  • Currently the code tweets every 15 minutes. You can go in and make changes to suit your setup at home.
  • Connections for this circuit include -
  • Software required includes -
  • Diagram -
  • Hardware required includes :

!!!Happy Hacking!!!

About

A collection of all the Arduino IoT Projects I have been working on

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages