Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/janekjan/ugolibev3
Really micro (u) library for reading raw sensor values from ev3dev.
https://github.com/janekjan/ugolibev3
ev3dev go
Last synced: 3 months ago
JSON representation
Really micro (u) library for reading raw sensor values from ev3dev.
- Host: GitHub
- URL: https://github.com/janekjan/ugolibev3
- Owner: janekjan
- License: mit
- Created: 2015-03-05T23:06:27.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-05T23:15:35.000Z (almost 10 years ago)
- Last Synced: 2024-08-03T23:18:00.936Z (6 months ago)
- Topics: ev3dev, go
- Language: Go
- Size: 215 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-golang-repositories - ugolibev3
README
# ugolibev3
Really micro (u) library for reading raw sensor values from ev3dev.###How to use
__Simple__:go get github.com/janekjan/ugolibev3
go install github.com/janekjan/ugolibev3
Import with: import "github.com/janekjan/ugolibev3"
####Usage
value := ugolibev3.ReadSensorValue(0)Put 0 as an argument when you have only one sensor attached and this will work. If you have two sensors the last attached sensor will return from ReadSensorValue(1) and the first attached - from 0. IT'S NOT THE PORT NUMBER.
It's like in http://www.ev3dev.org/docs/drivers/lego-sensor-class/ sensor file but not counting the disconnected sensors.