Geiger counter: Difference between revisions

From air
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
[[Image:wifibot-with-geiger-gas.jpg|300px|thumb|right|WifiBot with geiger counters and toxic gas sensors]]
[[Image:M2m_drone_1.jpg|300px|thumb|right|On board Geiger counter (connected the USB port of the ARDrone v1)]]
[[Image:CaptureGeigerFukushimaFrance20110323.png|300px|thumb|right|Capture des particules détectés dans la nuit du 23 03 2011 à Grenoble (chaque trait vertical est le nombre de particules par seconde).]]


[http://www.sparkfun.com/products/9848 Geiger counter]
[http://www.sparkfun.com/products/9848 Geiger counter]


Line 61: Line 66:
==Application==
==Application==
[[Drone PRI (Prévention des Risques Industriels)]]
[[Drone PRI (Prévention des Risques Industriels)]]

[[Image:M2m_drone_1.jpg|600px]]


Capture des particules détectés dans la nuit du 23 03 2011 à Grenoble (chaque trait vertical est le nombre de particules par seconde).
[[Image:CaptureGeigerFukushimaFrance20110323.png|600px]]

Revision as of 07:28, 7 April 2012

WifiBot with geiger counters and toxic gas sensors
On board Geiger counter (connected the USB port of the ARDrone v1)
Capture des particules détectés dans la nuit du 23 03 2011 à Grenoble (chaque trait vertical est le nombre de particules par seconde).


Geiger counter


Code Processing pour visualiser les particules recues.

/**
 * Geiger Counter
 * 
 * Read data from the serial port ("0" "1") from SEN-09848 and change the color
 * of a rectangle when a switch connected to the Geiger Counter
 * SEN-09848 http://www.sparkfun.com/products/9848 .
 */


import processing.serial.*;

Serial myPort;  // Create object from Serial class
int val;      // Data received from the serial port
int fg=0;
int serialPortPos=1; // 0 on my PC is the Modem port.
int counter0=0;
int counter1=0;

void setup() 
{
  size(200, 200);
  String portName = Serial.list()[serialPortPos];
  myPort = new Serial(this, portName, 9600);
}

void draw()
{
  if ( myPort.available() > 0) {  // If data is available,
    val = myPort.read();         // read it and store it in val
    background(255);

    // Set background to white
    if(val=='0') {
      counter0++; 
    } else {
      counter1++;
    }
    if(fg==0) {
      fg=204;
    } else {
      fg=0; 
    }
    
    fill(fg);
    text((counter0+counter1)+":"+counter0+":"+counter1,8,height-6);
  
    long timestamp=System.currentTimeMillis();
    println(timestamp+"="+new Date(timestamp));
  }
  
  rect(50, 50, 100, 100);
}


Application

Drone PRI (Prévention des Risques Industriels)