Pages: [1]   Go Down
Author Topic: Controling the LED intensity by read a txt file from a SD card  (Read 339 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi !

sory for my poor english ... smiley-cry

I need your help for a project :

- first i want to control the intensity of a led by reading a text file :

here a exemple of a textfile :
myFile.txt :
Code:
255,100,255,50,100,20,10,200,50,90,85,200,0,0,0,255

my equipment :
Arduino Uno, microSD Shield, power led shield, micro card SD

So exacly what i want :
during 60 seconds my leds light intensity i and after the intensity  i+1 etc. ...

I know how read a text file and open a text file with the SD library but i don't know how to parse my text file and get the good intensity at the time t smiley-roll-sweat

so i want something like that :
Code:
# open and read the textfile from the SD card
# for t to end of the textfile
      intensity = intensity at t
      analogWrite(led,intensity)
      delay(60000)
# for each time t i want to know the intensity i on my screen
      Serial.println(intensity);

- in a second time i want to do that for 2 leds with 2 differents array on the same text file.

If you have some exemples and ideas smiley
thanks so much smiley

Ps : i'm very very big beginner in Arduino language ...
Logged

Pages: [1]   Go Up
Jump to: