Introduction: Light Tracking (Intel IoT EDI)
Hi, on this Instructable, I'll show my first project with intel Edison.
This is the first part of a final Project of a Solar Tracker System for orientate an array of solar panels. With the Edison’s cloud capabilities the final project it could store the orientation data on cloud and share information with near arrays of solar panels. With the community information will be created optimized orientation patrons for future years.
Well, by the moment this is my first approximation so it just detects the light intensity and indicates on the LCD Display the measures and the action to take:
- Turn Right ->
- Turn Left <-
- Turn Up U
- Turn Down D
Step 1: Step 1 What We Need
We'll use an Intel Edison with the Arduino Breakout Board, Four Grove Ligth sensor, one Grove LCD RGB Backlight and one Grove Base Shield V2.
Arduino IDE.
Step 2: Step 2 Assembly
The grove system allows us to so easy mount and start testing.
Mount the Base Shield on the Arduino Breakout Board.
Mount the LCD RGB Backlight on one I2C port.
Mount the four Ligth Sensors on the analog ports (A0, A1, A2, A3)
Step 3: Step 3 Ligth Sensors Array
We will to “name” the light sensors on this way:
Connected to A0 = S1 Connected to A1 = S2 Connected to A2 = S3 Connected to A3 = S4
Because this is just a testing stage we can use cardboard, plastic, rubber bands, etc, to make the array. But the important thing is the distribution of sensors which must be like this:
Up
Left S1 | S3 Rigth
S2 | S4
Down
In my case i made a quick 3D printed base, it doesn’t work like i expect, i don't put here the STL for that reason.
Step 4: Step 4 Code
This is my code:
You need to install the library rgb_lcd, you can fin it on the seeedstudio page.
#include
#include "rgb_lcd.h"
rgb_lcd lcd;
int valorAnterior;
int valorTotal;
int valorArriba;
int valorIzq;
int valorAbajo;
int valorDer;
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
}
void loop() {
int S1 = analogRead(0);
int S2 = analogRead(1);
int S3 = analogRead(2);
int S4 = analogRead(3);
valorTotal = S1 + S2 + S3 + S4;
valorArriba = S1 + S3;
valorAbajo = S2 + S4;
valorIzq = S1 + S2;
valorDer = S3 + S4;
lcd.clear();
if (valorAnterior == valorTotal) {
lcd.setCursor(7,0);
lcd.write("=");
lcd.setCursor(7,1);
lcd.write("=");
}
else
{
if (valorArriba > valorAbajo)
{
lcd.setCursor(7,0);
lcd.write("U");
}
else {
lcd.setCursor(7,0);
lcd.write("D");
}
if (valorIzq > valorDer)
{
lcd.setCursor(7,1);
lcd.write("<-");
}
else {
lcd.setCursor(7,1);
lcd.write("->");
}
}
lcd.setCursor(0,0);
lcd.write("S1:");
lcd.setCursor(3,0);
lcd.print(S1,1);
lcd.setCursor(0,1);
lcd.write("S2:");
lcd.print(S2,1);
lcd.setCursor(10,0);
lcd.write("S3:");
lcd.setCursor(13,0);
lcd.print(S3,1);
lcd.setCursor(10,1);
lcd.write("S4:");
lcd.print(S4,1);
lcd.setRGB((S1/4),(S3/4),(valorAbajo/8));
valorAnterior = valorTotal;
delay(1000);
}
Step 5: Step 5 Result
The code reads the sensors values and stores it, then sum the values in four groups:
Up = S1 + S3 Down = S2 + S4
Left = S1 + S2 Right = S3 + S4
The Edison compares the value and take a choice of move on the direction of the major light intensity (Sum of sensors), in this example it prints on the display “U” for upper movement, “D” for down movement, “->” for right movement and “<-“ for left movement.
The sensors values are printed on the display.
And… well it doesn't functional or useful but with an RGB LCD, i just can't resist… so the LCD color changes with the values of sensors.

Participated in the
Intel® IoT Invitational
2 Comments
7 years ago
Great Edison project. If you want to make the video easier for people to watch, you can embed it in the step with the "Embed Video" tool in the step editor. Then people will be able to watch it on the page without having to download it.
Reply 7 years ago
Thanks! it is my first instructable, i will search the option of "Embed".