Skip to content

Commit fabe1ed

Browse files
Adding ReadUltrasonicSensor support
1 parent cc62683 commit fabe1ed

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ Reads the value from external ultrasonic sensor.
135135

136136
#### Returns
137137

138-
Distance in mm from `0` or `1`. 1 means obstacle at distance lower then 30cm and 0 means no obstacle.
138+
Distance in mm from `0` or `1`. 1 means obstacle at distance lower then trigger distance(can be set by potentiometer) and 0 means no obstacle.
139139

140140
---
141141

keywords.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Attiny84_IO_basic KEYWORD1
1212
###########################################
1313
# Methods and Functions (KEYWORD2)
1414
###########################################
15-
Robot KEYWORD2
15+
Cing KEYWORD2
1616
RunMotor KEYWORD2
1717
ReadLightSensor KEYWORD2
1818
ReadUltrasonicSensor KEYWORD2

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"authors": "Stanislav Jochman, Veronika Nemjová",
2727
"frameworks": "arduino"
2828
},
29-
"version": "3.0.6",
29+
"version": "3.0.7",
3030
"frameworks": "arduino",
3131
"platforms": "*"
3232
}

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Attiny84_IO_basic
2-
version=3.0.6
2+
version=3.0.7
33
author=RobotCing Team
44
maintainer=RobotCing Team <robotcing@gmail.com>
55
sentence=Library for robot Cing with Attiny84.

src/Attiny84_IO_basic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ int Cing::ReadLightSensor(int sensor,String mode)
242242
//--------------------------------------------
243243
// UltrasonicSensor
244244
//--------------------------------------------
245-
int Cing::ReadUltrasonicSensor()
245+
bool Cing::ReadUltrasonicSensor()
246246
{
247247
#define UltrasonicSensor 4
248248
pinMode(UltrasonicSensor,INPUT);

src/Attiny84_IO_basic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Cing
1515
Cing();
1616
void RunMotor(String motor,int speed= 100,String mode = "digital");
1717
int ReadLightSensor(int sensor = 1,String mode = "digital");
18-
int ReadUltrasonicSensor();
18+
bool ReadUltrasonicSensor();
1919
int ReadShineSensor();
2020
bool ReadButtonExternal();
2121
int ReadPotentiometerExternal();

0 commit comments

Comments
 (0)