SenseShoot = ArduinoBT + pda

hello, :wink:
i am currently in an intership at the college of ingenieering and architecture of fribourg.
first i present you the aim of the project : the idea is when you go in holidays you want to take picture to show your trip to your friends. But memories are not only a picture it was also the atmosphere. So we want to make a camera who can take the information of environment which surrounds us.

So we have done a program which allows you to take a picture, send an order to the arduino (by bluetooth). The ArduinoBT capture temperature, humidity, luminosity, GPS coordinates and send it to the pda. Then the program register the picture and the informations in the same folder with the same name (.txt for the informations and .jpg for the picture)

two screenshoot of the application running on pda :

ps: sry for my english


interesting project! Not sure I'd use any of that information apart from the GPS coords though. Do you mind explaining the different components to it?


our project is a part of a bigger project: an intelligent living room. Information will allow us to adapt the atmosphere of the room to those of the shoot.

For the temperature/humidity we use an SHT11 (Wayne's Raging Reality: Ardunio and the SHT15)
the pressure : MPXA4115A6U
luminosity :TSL252R
and an arduinoBT with GPS (

for all component we found in arduino forum or in the web how to use them with arduino ^^

the difficulty was the communication bluetooth between the pda and the board (I knew nothing about bluetooth ^^)

a part of the source code :
on the arduino board :

void loop(){

Serial.println("Elements mesures: ");

float vP = analogRead(pressurePin); //take and print the pressure

float vL = analogRead(lightPin); //take and print the luminosity

int temp_raw = getTempSHT(); //take the temperature
Serial.print(" *Temperature: “);
float temp_degc = (temp_raw * D2) + D1; // temperature in degree
Serial.print(” degC"); // print temperature

int rh_raw = getHumidSHT(); // take the humidity
Serial.print(" *Humidity(%RH): ");
float rh_lin = C3 * rh_raw * rh_raw + C2 * rh_raw + C1;
float rh_true = (temp_degc * (T1 + T2 * rh_raw) + rh_lin);

localisationGPS(); //GPS

dormeur(); //Sleep

The Sleep function for that we use information in website:
//----Sleep function----------
void dormeur(){
Serial.println("Pour une mesure appuyez sur une touche, puis faites ‘entrer’ ");
attachInterrupt(0,wakeUpNow, LOW);


and a part of the c# code implanted on the pda which do the communication between pda and arduino:
i use the inTheHand Bluetooth library (

BluetoothClient client = new BluetoothClient(); //create a bluetooth client

– to connect to the arduino –
private void connectionArduino(BluetoothClient client){
InTheHand.Net.BluetoothAddress adresseBt;
adresseBt = BluetoothAddress.Parse(“000780861AD1”); // arduinoBT adress

BluetoothEndPoint ep = new BluetoothEndPoint(adresseBt, BluetoothService.SerialPort);
client.Connect(ep); // connect
label1.Text = label1.Text + "connection a " + adresseBt + “etablie \n”;
catch(Exception e) {
label1.Text = label1.Text + “connexion echouée”;
Connection = false;

— to wake up the arduino and receive information –
private void ReveilArduino(BluetoothClient client)
Stream peerStream = client.GetStream(); // open a stream between arduino and pda
Byte buffer = System.Text.Encoding.ASCII.GetBytes(“a”);
peerStream.Write(buffer, 0, buffer.Length); // send something to wake up the board
peerStream.Flush(); // close send stream
StreamReader sr = new StreamReader(peerStream); // open a read stream
String Donnees = “”;
StreamWriter writer = new StreamWriter("\Storage Card\Sense\" + “Shoot” + DateTime.Now.ToString(“ddMMyy-HHmm”) + “.txt”); // name of the.txt
for (int i = 0; i < 6; i++)
Donnees = sr.ReadLine(); // read the information from arduinoBT
writer.WriteLine(Donnees); // write them in a .txt
writer.Close(); // close the stream wich write in .txt
peerStream.Close(); // fermeture du flux de lecture bluetooth
client.close() ;