File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -50,16 +50,16 @@ void loop() {
50
50
// This function is called at intervals to send HC-SR04 sensor data to Cayenne.
51
51
CAYENNE_OUT (DISTANCE_VIRTUAL_CHANNEL)
52
52
{
53
- digitalWrite (TRIGGER_PIN, LOW);// Clears the trigger Pin
53
+ digitalWrite (TRIGGER_PIN, LOW); // Clears the trigger pin
54
54
delayMicroseconds (2 );
55
55
56
- digitalWrite (TRIGGER_PIN, HIGH); // Sets the trigger Pin on HIGH state for 10 micro seconds
56
+ digitalWrite (TRIGGER_PIN, HIGH); // Sets the trigger pin on HIGH state for 10 micro seconds
57
57
delayMicroseconds (10 );
58
58
digitalWrite (TRIGGER_PIN, LOW);
59
59
60
- duration = pulseIn (ECHO_PIN, HIGH);// Reads the echo Pin , returns the sound wave travel time in microseconds
60
+ duration = pulseIn (ECHO_PIN, HIGH); // Reads the echo pin , returns the sound wave travel time in microseconds
61
61
62
- distance = duration * 0.034 / 2 ; // Calculating the distance.
62
+ distance = duration * 0.034 / 2 ; // Calculating the distance.
63
63
64
64
// Send the distance value to Cayenne on proximity widget in centimeter.
65
65
Cayenne.virtualWrite (DISTANCE_VIRTUAL_CHANNEL, distance, " prox" , " cm" );
You can’t perform that action at this time.
0 commit comments