Introduction: Arduino YUN + Cayenne = Quality of Light

Picture of Arduino YUN + Cayenne = Quality of Light

I've used an Arduino YUN and the new IoT platform Cayenne for monitoring the quantity and the quality of light.

I've a friend that grows up chiles. He talk me about the importance of temperature, light and soil Ph. An important aspect of cultivation is the quality of light. The quality, like the composition of colors waves. I've created an IoT app that analyse the component of light. This project analyse the singles colours of light. One sensor for RED, one for GREEN and one for BLUE. That sensor print the value on the cluod, and my friend can read this values with her smartphone anytime, and anywhere. This is possible by using Cayenne IoT. Cayenne is a awesome platform that allows the creation of IoT projects like this. See the official site on http://www.cayenne-mydevices.com.

Materials

  • Arduino Yun × 1
  • Photo resistor × 3
  • USB-A to B Cable × 1
  • Breadboard (generic) × 1

Software apps and online services

  • Cayenne
  • Arduino IDE

Step 1: The Circuit

Picture of The Circuit

Connect the three photoresistors to ground and to VCC 5v. Between the photoresistors and the VCC put an 1k Ohm resistors. After connect the pin A0, A1 and A2 to the photoresistors.

The photoresistors

You can use three photoresistors. One for the red, one for the green and other for blue. This photoresistors change the value of resistance by variation of light.

Now you can add the filter to the photoresitors. When the light hits the sensor with the red filter, only the red light cross the filter. When the light hit the sensor, the value of resistence change. Arduino YUN read this value, and send this value to the Cayenne dashboard.

Step 2: Sign Up Cayenne and Install Arduino Library

Picture of Sign Up Cayenne and Install Arduino Library

Sign Up on Cayenne app. You can create a Cayenne account for free. Go to http://www.cayenne-mydevices.com and sign up. Download the app for iOS or Android. An other method is go to Cayenne Dashboard on your computer. You can populate the dashboard with many widget. On the Dashboard you can see the data and command the I/O pins.

Download and install the Cayenne library for Arduino

Download the Cayenne library Go to on http://www.cayenne-mydevices.com/docs/ and download the Arduino library. Follow the instructions and add the library to Arduino IDE. Like in this link: http://www.cayenne-mydevices.com/docs/

Step 3: ​Upload the Sketch on Arduino YUN

Picture of ​Upload the Sketch on Arduino YUN

After that you have to download the sketch and upload this on your Arduino YUN.

Connect to your Cayenne dashboard, and choose Arduino YUN like platform. After this, download the sketch, and upload the sketch on your Arduino YUN. Pay ATTENTION Upload the sketch with your personal token.

Step 4: ​Create a New Cayenne Dashboard

Picture of ​Create a New Cayenne Dashboard

Sign In on the Cayenne app, and create a new dashboard. When you open a dashboard you can add the widget to it.

Select photoresistor, and like device select Arduino YUN. After select A0, A1 and A2 like input.

Add three gauche on you dashboard, or add three charts.

Select ANALOG for data source, and A0 for red, A1 for green, and A2 for blue.

Step 5: View the Quality of Light on IPhone and IPad

Picture of View the Quality of Light on IPhone and IPad

You can view the dashboard by using your smartphone, iPhone, iPad or Computer.

This is a photo of iPhone with three gauche. You can see the three values. The RED, the GREEN and the BLUE. An other method to visualize the data is the charts. With charts you can see the variation of data in time.

Comments

raspberrypi33 (author)2016-09-12

Thanks for sharing!

masteruan (author)raspberrypi332016-09-12

Thanks for read my project.

About This Instructable

810views

8favorites

License:

More by masteruan:Cayenne and SparkFun IoT 433 Mhz SocketsArduino MKR Fox 1200 Sigfox Meteo StationGuess the Number With Arduino KeyPad
Add instructable to: