Skip to content

RobotCing/Attiny85_IO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Attiny85_IO Library for robot Cing

This library allows robot Cing to be programmed easily.

For more information about this library please visit us at http://robotcing.wz.sk


Attiny Libraries Functions

Cing.RunMotor()

Description

Controls motor movement.

Syntax

Cing.RunMotor(motor,state,mode)

Parameters

motor: "A", "B", "AB"

state: 0 or 1 if digital mode is used and 0 to 100 if analog mode is used

mode: "digital" or "analog"


Cing.ReadButtonExternal()

Description

Reads the value from external button, either 0 or 1.

Syntax

Cing.ReadButtonExternal()

Returns

0 if button is not pressed or 1 if button is pressed.


Cing.ReadPotentiometerExternal()

Description

Reads the value from external potentiometer.

Syntax

Cing.ReadPotentiometerExternal()

Returns

From 0 to 100 depending on potentiometer position.


Cing.ReadLightSensor()

Description

Reads the value from light sensor.

Syntax

Cing.ReadLightSensor(sensor,mode)

Parameters

sensor: 1 or 2 used for selection of sensor

mode: "digital" or "analog"

Returns

From 0 to 100 in analog mode and either 0 or 1 in digital mode.


Cing.ReadShineSensor()

Description

Reads the value from external shine sensor.

Syntax

Cing.ReadShineSensor()

Returns

From 0 to 100 depending on ambient light.


Cing.ReadTempSensor()

Description

Reads the value from external temperature sensor.

Syntax

Cing.ReadTempSensor()

Returns

Temperature in °C from -55 to +125.


Cing.ReadUltrasonicSensor()

Description

Reads the value from external ultrasonic sensor.

Syntax

Cing.ReadUltrasonicSensor()

Returns

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.


License

Copyright © 2019 RobotCing Team. All right reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.