Skip to content

Commit fe5e71b

Browse files
author
gabriele
committed
Added Fritzing file and rendered image
1 parent 79f84be commit fe5e71b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

proximity/proximity.fzz

307 KB
Binary file not shown.

proximity/proximity.ino

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin
3535
void setup() /****** SETUP: RUNS ONCE ******/
3636
{
3737
Serial.begin(9600);
38-
Serial.println("Resetting the dammed SR-04 UltraSonic Distance Meter");
39-
Serial.println("questions to vidalgm@gmail.com");
38+
// Serial.println("Resetting the dammed SR-04 UltraSonic Distance Meter");
39+
// Serial.println("questions to vidalgm@gmail.com");
4040
pinMode (resetsensor, OUTPUT);
4141
pinMode (ledsensor, OUTPUT);
4242
pinMode(2, OUTPUT);
@@ -55,16 +55,16 @@ void loop() /****** LOOP: RUNS CONSTANTLY ******/
5555
digitalWrite (resetsensor,HIGH); //Gives power to the dammned SR-04 thru the BC-547
5656
delay(100);// Wait 100ms between pings (about 10 pings/sec). 29ms should be the shortest delay between pings.
5757
DistanceIn = sonar.ping_in();
58-
Serial.print("Ping: ");
59-
Serial.print(DistanceIn); // Convert ping time to distance and print result
60-
// (0 = outside set distance range, no ping echo)
61-
Serial.print(" in ");
58+
// Serial.print("Ping: ");
59+
// Serial.print(DistanceIn); // Convert ping time to distance and print result
60+
// // (0 = outside set distance range, no ping echo)
61+
// Serial.print(" in ");
6262

6363
delay(100);// Wait 100ms between pings (about 10 pings/sec). 29ms should be the shortest delay between pings.
6464
DistanceCm = sonar.ping_cm();
65-
Serial.print("Ping: ");
66-
Serial.print(DistanceCm);
67-
Serial.println(" cm");
65+
// Serial.print("Ping: ");
66+
// Serial.print(DistanceCm);
67+
// Serial.println(" cm");
6868
if (DistanceCm < 1) { //If distance is getting too low
6969
digitalWrite (resetsensor, LOW); //reset transistor, this is, take out power of SR-04
7070
digitalWrite (ledsensor, LOW); //light down to indicate we are resetting

proximity/proximity_bb.png

381 KB
Loading

0 commit comments

Comments
 (0)