Circuit
// the setup routine runs once when you press reset: | |
void setup() { | |
// initialize serial communication at 9600 bits per second: | |
Serial.begin(9600); | |
} | |
// the loop routine runs over and over again forever: | |
void loop() { | |
// read the input on analog pin 0: | |
int Sense = analogRead(A0); | |
// print out the value you read: | |
Serial.println(Sense); | |
delay(1000); // delay in between reads for stability | |
} |
<!DOCTYPEhtml> | |
<html> | |
<body> | |
<?php | |
$servername="localhost"; | |
$username="root"; | |
$password=""; | |
$dbname="sample_db"; | |
// Create connection | |
$conn=newmysqli($servername, $username, $password, $dbname); | |
// Check connection | |
if ($conn->connect_error) { | |
die("Connection failed: ".$conn->connect_error); | |
} | |
$sql="SELECT lat, lng FROM noisetable"; | |
$result=$conn->query($sql); | |
if ($result->num_rows>0) { | |
// output data of each row | |
while($row=$result->fetch_assoc()) { | |
echo"<br> id: ".$row["lat"]." - Name: ".$row["lng"]."".$row["N"] ."<br>"; | |
} | |
} else { | |
echo"0 results"; | |
} | |
$conn->close(); | |
?> | |
</body> | |
</html> |
<html> | |
<body> | |
<?php | |
// Create connection | |
$conn = new mysqli('localhost','root',''); | |
// Check connection | |
if ($conn->connect_error) { | |
die("Connection failed: " . $conn->connect_error); | |
} | |
echo "DB Connected successfully"; | |
// this will select the Database sample_db | |
mysqli_select_db($conn,"sample_db"); | |
echo "\n DB is seleted as Test successfully"; | |
// create INSERT query | |
$sql="INSERT INTO sample_table (fname,age) VALUES ('$_POST[fname]','$_POST[age]')"; | |
if ($conn->query($sql) === TRUE) { | |
echo "New record created successfully"; | |
} else { | |
echo "Error: " . $sql . "<br>" . $conn->error; | |
} | |
mysqli_close($conn); | |
?> | |
</body> | |
</html> |
<html> | |
<body> | |
<h1>Sensor Network</h1> | |
<formaction="getData.php"method="post"> | |
X: <inputtype="text"name="fname" /><br><br> | |
Y: <inputtype="int"name="age" /><br><br> | |
Noise Level is: <outputtype="int"name="NoiseLevel"/><br><br> | |
<inputtype="submit" /> | |
</form> | |
</body> | |
</html> |
[{"id":"d6230d5f.c05e","type":"serial in","z":"b9075383.db257","name":"","serial":"1b8769a6.621dc6","x":91,"y":135,"wires":[["ea730c90.ebc4b","84c15113.4ecec","e146cbcf.251818"]]},{"id":"ea730c90.ebc4b","type":"debug","z":"b9075383.db257","name":"","active":true,"console":"false","complete":"false","x":501,"y":274,"wires":[]},{"id":"e146cbcf.251818","type":"twitter out","z":"b9075383.db257","twitter":"","name":"Tweet","x":689,"y":144,"wires":[]},{"id":"84c15113.4ecec","type":"ui_text","z":"b9075383.db257","group":"90f1c978.bba628","order":0,"width":0,"height":0,"name":"CO in PPM","label":"Arduino Reading","format":"{{msg.payload}}","layout":"col-center","x":467,"y":41,"wires":[]},{"id":"1b8769a6.621dc6","type":"serial-port","z":"b9075383.db257","serialport":"COM7","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false},{"id":"90f1c978.bba628","type":"ui_group","z":"b9075383.db257","name":"CarbonMonoxide in Atmosphere","tab":"93b83a33.771108","disp":true,"width":"9"},{"id":"93b83a33.771108","type":"ui_tab","z":"b9075383.db257","name":"Home","icon":"dashboard"}] |
// the setup routine runs once when you press reset: | |
void setup() { | |
// initialize serial communication at 9600 bits per second: | |
Serial.begin(9600); | |
} | |
// the loop routine runs over and over again forever: | |
void loop() { | |
// read the input on analog pin 0: | |
int Sense = analogRead(A0); | |
// print out the value you read: | |
Serial.println(Sense); | |
delay(1000); // delay in between reads for stability | |
} |
<!DOCTYPEhtml> | |
<html> | |
<body> | |
<?php | |
$servername="localhost"; | |
$username="root"; | |
$password=""; | |
$dbname="sample_db"; | |
// Create connection | |
$conn=newmysqli($servername, $username, $password, $dbname); | |
// Check connection | |
if ($conn->connect_error) { | |
die("Connection failed: ".$conn->connect_error); | |
} | |
$sql="SELECT lat, lng FROM noisetable"; | |
$result=$conn->query($sql); | |
if ($result->num_rows>0) { | |
// output data of each row | |
while($row=$result->fetch_assoc()) { | |
echo"<br> id: ".$row["lat"]." - Name: ".$row["lng"]."".$row["N"] ."<br>"; | |
} | |
} else { | |
echo"0 results"; | |
} | |
$conn->close(); | |
?> | |
</body> | |
</html> |
<html> | |
<body> | |
<?php | |
// Create connection | |
$conn = new mysqli('localhost','root',''); | |
// Check connection | |
if ($conn->connect_error) { | |
die("Connection failed: " . $conn->connect_error); | |
} | |
echo "DB Connected successfully"; | |
// this will select the Database sample_db | |
mysqli_select_db($conn,"sample_db"); | |
echo "\n DB is seleted as Test successfully"; | |
// create INSERT query | |
$sql="INSERT INTO sample_table (fname,age) VALUES ('$_POST[fname]','$_POST[age]')"; | |
if ($conn->query($sql) === TRUE) { | |
echo "New record created successfully"; | |
} else { | |
echo "Error: " . $sql . "<br>" . $conn->error; | |
} | |
mysqli_close($conn); | |
?> | |
</body> | |
</html> |
<html> | |
<body> | |
<h1>Sensor Network</h1> | |
<formaction="getData.php"method="post"> | |
X: <inputtype="text"name="fname" /><br><br> | |
Y: <inputtype="int"name="age" /><br><br> | |
Noise Level is: <outputtype="int"name="NoiseLevel"/><br><br> | |
<inputtype="submit" /> | |
</form> | |
</body> | |
</html> |
[{"id":"d6230d5f.c05e","type":"serial in","z":"b9075383.db257","name":"","serial":"1b8769a6.621dc6","x":91,"y":135,"wires":[["ea730c90.ebc4b","84c15113.4ecec","e146cbcf.251818"]]},{"id":"ea730c90.ebc4b","type":"debug","z":"b9075383.db257","name":"","active":true,"console":"false","complete":"false","x":501,"y":274,"wires":[]},{"id":"e146cbcf.251818","type":"twitter out","z":"b9075383.db257","twitter":"","name":"Tweet","x":689,"y":144,"wires":[]},{"id":"84c15113.4ecec","type":"ui_text","z":"b9075383.db257","group":"90f1c978.bba628","order":0,"width":0,"height":0,"name":"CO in PPM","label":"Arduino Reading","format":"{{msg.payload}}","layout":"col-center","x":467,"y":41,"wires":[]},{"id":"1b8769a6.621dc6","type":"serial-port","z":"b9075383.db257","serialport":"COM7","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false},{"id":"90f1c978.bba628","type":"ui_group","z":"b9075383.db257","name":"CarbonMonoxide in Atmosphere","tab":"93b83a33.771108","disp":true,"width":"9"},{"id":"93b83a33.771108","type":"ui_tab","z":"b9075383.db257","name":"Home","icon":"dashboard"}] |
// the setup routine runs once when you press reset: | |
void setup() { | |
// initialize serial communication at 9600 bits per second: | |
Serial.begin(9600); | |
} | |
// the loop routine runs over and over again forever: | |
void loop() { | |
// read the input on analog pin 0: | |
int Sense = analogRead(A0); | |
// print out the value you read: | |
Serial.println(Sense); | |
delay(1000); // delay in between reads for stability | |
} |
<!DOCTYPEhtml> | |
<html> | |
<body> | |
<?php | |
$servername="localhost"; | |
$username="root"; | |
$password=""; | |
$dbname="sample_db"; | |
// Create connection | |
$conn=newmysqli($servername, $username, $password, $dbname); | |
// Check connection | |
if ($conn->connect_error) { | |
die("Connection failed: ".$conn->connect_error); | |
} | |
$sql="SELECT lat, lng FROM noisetable"; | |
$result=$conn->query($sql); | |
if ($result->num_rows>0) { | |
// output data of each row | |
while($row=$result->fetch_assoc()) { | |
echo"<br> id: ".$row["lat"]." - Name: ".$row["lng"]."".$row["N"] ."<br>"; | |
} | |
} else { | |
echo"0 results"; | |
} | |
$conn->close(); | |
?> | |
</body> | |
</html> |
<html> | |
<body> | |
<?php | |
// Create connection | |
$conn = new mysqli('localhost','root',''); | |
// Check connection | |
if ($conn->connect_error) { | |
die("Connection failed: " . $conn->connect_error); | |
} | |
echo "DB Connected successfully"; | |
// this will select the Database sample_db | |
mysqli_select_db($conn,"sample_db"); | |
echo "\n DB is seleted as Test successfully"; | |
// create INSERT query | |
$sql="INSERT INTO sample_table (fname,age) VALUES ('$_POST[fname]','$_POST[age]')"; | |
if ($conn->query($sql) === TRUE) { | |
echo "New record created successfully"; | |
} else { | |
echo "Error: " . $sql . "<br>" . $conn->error; | |
} | |
mysqli_close($conn); | |
?> | |
</body> | |
</html> |
<html> | |
<body> | |
<h1>Sensor Network</h1> | |
<formaction="getData.php"method="post"> | |
X: <inputtype="text"name="fname" /><br><br> | |
Y: <inputtype="int"name="age" /><br><br> | |
Noise Level is: <outputtype="int"name="NoiseLevel"/><br><br> | |
<inputtype="submit" /> | |
</form> | |
</body> | |
</html> |
[{"id":"d6230d5f.c05e","type":"serial in","z":"b9075383.db257","name":"","serial":"1b8769a6.621dc6","x":91,"y":135,"wires":[["ea730c90.ebc4b","84c15113.4ecec","e146cbcf.251818"]]},{"id":"ea730c90.ebc4b","type":"debug","z":"b9075383.db257","name":"","active":true,"console":"false","complete":"false","x":501,"y":274,"wires":[]},{"id":"e146cbcf.251818","type":"twitter out","z":"b9075383.db257","twitter":"","name":"Tweet","x":689,"y":144,"wires":[]},{"id":"84c15113.4ecec","type":"ui_text","z":"b9075383.db257","group":"90f1c978.bba628","order":0,"width":0,"height":0,"name":"CO in PPM","label":"Arduino Reading","format":"{{msg.payload}}","layout":"col-center","x":467,"y":41,"wires":[]},{"id":"1b8769a6.621dc6","type":"serial-port","z":"b9075383.db257","serialport":"COM7","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false},{"id":"90f1c978.bba628","type":"ui_group","z":"b9075383.db257","name":"CarbonMonoxide in Atmosphere","tab":"93b83a33.771108","disp":true,"width":"9"},{"id":"93b83a33.771108","type":"ui_tab","z":"b9075383.db257","name":"Home","icon":"dashboard"}] |
SpaceApps is a NASA incubator innovation program.