Tag Archives: arduino tutorial

Arduino Phone

What you need:

1.Arduino Uno

2.TFT Touch Shield

3.GPRS Shield

4.RTC

5.Custom ArduinoPhone Charge Circuit (or Lipo Rider)

6.Li-po battery

7.A shell (with 3D printer)

All components at here.

 

More details: http://www.instructables.com/id/ArduinoPhone/

SainSmart 1.8 LCD / DHT-22 Temp / Humidity

I now have a DHT-22 Temperature and humidity module matched up with the SainSmart 1.8 TFT LCD. The tricky part of this project was converting floats to strings for the display. If you don’t need decimal point precision, you may not need this function, but it’s in there.

The DHT-22 connections and the SainSmart LCD connections are in the code.

/*
Arduino TFT text example

This example demonstrates how to draw text on the
TFT with an Arduino. The Arduino reads the value
of an analog sensor attached to pin A0, and writes
the value to the LCD screen, updating every
quarter second.

This example code is in the public domain

Created 15 April 2013 by Scott Fitzgerald

Heavily modified to work with the DHT-22 code
by Steve Spence of http://arduinotronics.blogspot.com

http://arduino.cc/en/Tutorial/TFTDisplayText

*/

#include “TFT.h” // Arduino LCD library
#include “SPI.h” // Arduino SPI Library

// pin definition for the Uno
// SCL -> 13
// SDA -> 11
#define cs   10
#define dc   9
#define rst  8

// create an instance of the library
TFT TFTscreen = TFT(cs, dc, rst);

// char array to print to the screen
char tempPrintout[6];
char humPrintout[6];

// Example testing sketch for various DHT humidity/temperature sensors
// Written by ladyada, public domain
// Fahrenheit conversion added by Steve Spence, http://arduinotronics.blogspot.com

#include “DHT.h” //get the DHT library from http://learn.adafruit.com/dht

#define DHTPIN 2     // what pin we’re connected to

// Uncomment whatever type you’re using!
//#define DHTTYPE DHT11   // DHT 11
#define DHTTYPE DHT22   // DHT 22  (AM2302)
//#define DHTTYPE DHT21   // DHT 21 (AM2301)

// Connect pin + (middle) of the sensor to +5V
// Connect pin S  (on the right) of the sensor to whatever your DHTPIN is (2)
// Connect pin – (on the left) of the sensor to GROUND
// Connect 10k resistor between S and +

int cycleTime = 2000;

DHT dht(DHTPIN, DHTTYPE);

float h;
float t;

void setup() {

// Put this line at the beginning of every sketch that uses the GLCD:
TFTscreen.begin();

// clear the screen with a black background
TFTscreen.background(0, 0, 0);

// write the static text to the screen
// set the font color to white
TFTscreen.stroke(255,255,255);
// set the font size
TFTscreen.setTextSize(2);
// write the text to the top left corner of the screen
TFTscreen.text(“Temp (F)”,0,0);
// write the text to the top left corner of the screen
TFTscreen.text(“Humidity (%)”,0,60);
// ste the font size very large for the loop
TFTscreen.setTextSize(4);

dht.begin();

}

void loop() {

// Read the value of the temp/humidity sensor on D2

// Reading temperature or humidity takes about 250 milliseconds!
// Sensor readings may also be up to 2 seconds ‘old’ (its a very slow sensor)
h = dht.readHumidity();
t = dht.readTemperature();
t = (t*1.8)+32; //C to F conversion

String tempVal = doubleToString(t, 0); // decimal places of precision
String humVal = doubleToString(h, 0); // decimal places of precision
// String sensorVal = String(1.234);

// convert the reading to a char array
tempVal.toCharArray(tempPrintout, 6);
humVal.toCharArray(humPrintout, 6);

// set the font color
TFTscreen.stroke(255,255,255);
// print the sensor value
TFTscreen.text(tempPrintout, 0, 25);
TFTscreen.text(humPrintout, 0, 85);
// wait for a moment
delay(cycleTime);
// erase the text you just wrote
TFTscreen.stroke(0,0,0);
TFTscreen.text(tempPrintout, 0, 25);
TFTscreen.text(humPrintout, 0, 85);
}

//Rounds down (via intermediary integer conversion truncation)
String doubleToString(double input,int decimalPlaces){
if(decimalPlaces!=0){
String string = String((int)(input*pow(10,decimalPlaces)));
if(abs(input)<1 p=””>if(input>0)
string = “0”+string;
else if(input<0 p=””>string = string.substring(0,1)+”0″+string.substring(1);
}
return string.substring(0,string.length()-decimalPlaces)+”.”+string.substring(string.length()-decimalPlaces);
}
else {
return String((int)input);
}
}

Mini Arduino Portable EEG – Brain Wave Monitor

20130702155110

Parts List / Tools Needed:

PARTS
1 Arduino Uno R3
1 SainSmart 1.8 ” Color TFT Display
1 Mini Breadboard
1 Mind Flex  EEG Headband -To monitor Brain Wave signals as described Here I recomend you review this project before starting to build this instructable. You will need to download the brain library found in the website
3 x AAA Batteries (for Mind flex headband)
1 x 9v battery +  (9v to Arduino power adapter cable, for portability) – optional, but needed to enter the battery operated contest! (if you like this instrucable , please vote for me 🙂
Jumper Wires
Scrap wire /  cable from your Junk Box about 12″ long
TOOLS
Soldering Iron
Wire Cutter /  Stripper
Screwdriver ,small Phillips head
Magnifying Glass

Originally from: http://www.instructables.com/id/Mini-Arduino-Portable-EEG-Brain-Wave-Monitor-/

SainSmart Joystick Gaming Kit

Don’t Know How to Get Started with Your Arduino?

Many beginners are likely to confront such a problem: after they buy an Arduino, they have no idea how they should start. Helpful manuals are very important. Eever product sold by us is attached with detailed instruction. Then you don’t need to be so worried about it.

In addition to manuals, you may have to look for some tutorials as well. Since it’s not so easy to find paper tutorials and it’s not convenient to carry a heavy book with you everywhere, we have found a very useful online tutorial for you.  There are several lessons in this tutorials by which you can have better understands of  Arduino.

~TOII{3ZCA037HM6)]{`64C

Now come and see this online tutorial:

http://www.ladyada.net/learn/arduino/