Go Down

Topic: Playing with Nokia LCD 3310 (Read 933 times) previous topic - next topic

rediculum

Jan 10, 2014, 05:23 pm Last Edit: Jan 10, 2014, 05:37 pm by rediculum Reason: 1
I spent some hours in playing with the Nokia LCD and some input devices, so I wanted to share that funny thing.
What you need:

- Breadboard
- Arduino (I used a nano)
- Nokia 3310 LCD
- DS1307 RTC
- 10kOhm poti
- Photoresistor and a 620ohm Resi.
- Some jumper wires

Attach all components like described in the links in the code or Arduino Playground and you should get this funny stuff working well.

Code: [Select]

/* Playing with Nokia LCD 3310 by ReDiculum Jan. 2014

Use at your own risk
*/

//https://code.google.com/p/pcd8544/
#include <PCD8544.h>

//https://github.com/davidhbrown/RealTimeClockDS1307
#include <Wire.h>
#include <RealTimeClockDS1307.h>

static PCD8544 lcd;

void setup() {
  lcd.begin(84, 48);
}

void loop() {
 // Potentiometer on A3
 lcd.setCursor(0,0); lcd.clearLine();
 int potValue = map(analogRead(3),0,1023,0,100);
 lcd.print("Poti: ");
 lcd.print(potValue);
 lcd.print("% ");
 drawBar(0, map(potValue,0,100,403,420));
 
 // Phototransistor on A6
 lcd.setCursor(0,2); lcd.clearLine();
 int phoValue = map(analogRead(6),0,1023,100,0);
 lcd.print("Phot: ");
 lcd.print(phoValue);
 lcd.print("% ");
 drawBar(2, map(phoValue,0,100,403,420));

 // RealTimeClock on A4+5
 lcd.setCursor(0,4); lcd.clearLine();
 lcd.print("Time: ");
 RTC.readClock();
 lcd.print(RTC.getHours());  lcd.print(":");
 lcd.print(RTC.getMinutes());  lcd.print(":");
 lcd.print(RTC.getSeconds());
}

void drawBar(int line, int val) {
 for (int i = 403; i <= val; i++) {
   lcd.setCursor(i,line);
   lcd.drawColumn(0,8);
 }    
}




Poti playing
http://www.youtube.com/watch?v=9ytFGUv3hdg

Photoresi playing
http://www.youtube.com/watch?v=l4bygUgNHa8
Regards
ReDiculum

Project:
LASERino

janost

I have tried that display and it went bad after a week.
Others have had them turn bad after a day.

The construction is not good.and the rubberstrip on the back looses contact after a while.

If yours work then great.
Its fun to play with.

Go Up