Project in progress
Arduino + Cayenne = Light Quality Monitoring

Arduino + Cayenne = Light Quality Monitoring © CC BY

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

  • 3,531 views
  • 0 comments
  • 11 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

Preface

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.

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.

Instructions

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 or go to Cayenne Dashboard on your computer

On your smartphone download the Cayenne app.

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/#using-cayenne-library.

Upload the sketch on Arduino YUN

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

Create a new 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.

You can view the dashboard by using smartphone, 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.

Code

Arduino YUN Cayenne codeArduino
Use this sketch to upload the data to Cayenne dashboard.
Open last Arduino IDE. Connect your Arduino YUN to computer, and upload this code.
IMPORTANT !
Modify the char token[] = "xxxxxxxxxxx"; with your char token.
/*
Cayenne Yun Example

This sketch connects to the Cayenne server using an Arduino Yun
and runs the main communication loop.

The Cayenne Library is required to run this sketch. If you have not already done so you can install it from the Arduino IDE Library Manager.

Steps:
1. Set the token variable to match the Arduino token from the Dashboard.
2. Compile and upload this sketch.

For Cayenne Dashboard widgets using digital or analog pins this sketch will automatically
send data on those pins to the Cayenne server. If the widgets use Virtual Pins, data
should be sent to those pins using virtualWrites. Examples for sending and receiving
Virtual Pin data are under the Basics folder.
*/

#define CAYENNE_DEBUG         // Uncomment to show debug messages
#define CAYENNE_PRINT Serial  // Comment this out to disable prints and save space
#include <CayenneYun.h>
#include <YunClient.h>

// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "xxxxxxxxxxx";

void setup()
{
	Serial.begin(9600);
	Cayenne.begin(token);
}

void loop()
{
	Cayenne.run();
}

Schematics

Cayenne Arduino YUN RGB photoresistors
Connect the resistors to Arduino YUN. You can use R G B filters.
Cayenne%20arduino%20yun
Cayenne Arduino YUN file
This is a Fritzing scheme.
Cayenna%20Arduino%20YUN.fzz

Comments

Similar projects you might like

Cayenne and SparkFun IoT 433 Mhz Sockets

Project tutorial by Giovanni Gentile

  • 1,966 views
  • 0 comments
  • 10 respects

Arduino Based Security Project Using Cayenne

Project tutorial by ScottC

  • 9,172 views
  • 3 comments
  • 19 respects

Water Quality Monitoring Using MKR1000 and ARTIK Cloud

Project tutorial by Team Animo!

  • 7,076 views
  • 12 comments
  • 30 respects

IoT Smart Socket Arduino And Cayenne

Project tutorial by Giovanni Gentile

  • 1,340 views
  • 0 comments
  • 4 respects

Indoor Air Quality Monitoring System

Project tutorial by Team East West University

  • 9,113 views
  • 3 comments
  • 40 respects

Air Quality Monitoring

Project tutorial by Ruchir Sharma

  • 5,868 views
  • 4 comments
  • 20 respects
Add projectSign up / Login