Skip to content

Commit 5358ac3

Browse files
committed
readme
1 parent 1249fdc commit 5358ac3

File tree

2 files changed

+20
-38
lines changed

2 files changed

+20
-38
lines changed

README.md

+19-37
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,30 @@
11
# upboard_ros
22
**This package is compatible with [UpBoard](https://up-board.org/up/specifications/), [UpSquared](https://up-board.org/upsquared/specifications/) and [UpXtreme](https://up-board.org/up-xtreme/)**<br>
3-
It is part of [Erwhi Hedgehog](https://gbr1.github.io/erwhi_hedgehog.html) development.
3+
It is part of [Erwhi Hedgehog](https://gbr1.github.io/erwhi_hedgehog.html) development.<br>
4+
It is based on [mraa libraries](https://github.com/intel-iot-devkit/mraa).
45

56
---
6-
## 1. Setup
7-
```
8-
cd ~/catkin_ws/src
9-
git clone https://github.com/gbr1/upboard_ros.git
10-
cd ..
11-
catkin_make
12-
catkin_make install
13-
```
14-
## 2. Test
15-
Leds animations:<br>
16-
`roslauch upboard_ros led_test.launch`<br>
17-
<br>
18-
Manual test:
19-
1. Open a terminal:<br>
20-
`roscore`
21-
2. In a new terminal:<br>
22-
`rosrun upboard_ros led_node`<br>
23-
3. In a new terminal:<br>
24-
to turn on blue led:<br>
25-
`rostopic pub /upboard/leds upboard_ros/Leds "{header: auto, leds:[{led: 1, value: 1}]}" --once `<br>
26-
to turn off blue led:<br>
27-
`rostopic pub /upboard/leds upboard_ros/Leds "{header: auto, leds:[{led: 1, value: 0}]}" --once `<br>
28-
## 3. Nodes
29-
3.1 ***led_node***, allows you to connect to upboard leds
30-
- **Subcribed**:
31-
- ***/upboard/leds***<br>
32-
Header header<br>
33-
Led[] leds<br>
34-
_Led:_<br>
35-
_uint8 led, you can use also constants ALL=0, BLUE=1, YELLOW=2, GREEN=3, RED=4_<br>
36-
_bool value, true or 1 is on and false or 0 is off_
37-
38-
3.2 ***led_test***, allows you to test upboard leds
39-
- **Published**:
40-
- ***/upboard/leds***<br>
7+
8+
## Functionalities
9+
10+
### on-board leds
11+
You can use ROS topic to control onboard leds<br>
12+
![https://www.youtube.com/watch?v=SyPCCiDiLIw](https://user-images.githubusercontent.com/9216366/56963016-390da380-6b58-11e9-99fb-32cefb355f6b.gif)<br><br>
13+
14+
### GPIOs
15+
You can use ROS topic to control GPIO as Digital Output and Digital Input<br>
16+
![https://www.youtube.com/watch?v=aepSXab6H2M](https://user-images.githubusercontent.com/9216366/56962507-06af7680-6b57-11e9-85b3-15c1774bee03.gif)<br><br>
4117

4218

19+
## How to
20+
Check featured [wiki](https://github.com/gbr1/upboard_ros/wiki) to learn more.
4321

4422
## 4. Future
45-
Idea is to add also GPIO and other useful data from Upboard.
23+
Needs to be implemented:
24+
- PWM in GPIO node
25+
- I2C node
26+
- UART node
27+
- SPI node
4628
<br>
4729
<br>
4830

src/gpio_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void gpioCallback(const upboard_ros::ListGpio & msg){
2525
while((!found) && (k<msg.gpio.size())){
2626
if (msg.gpio[k].pin==BUTTON){
2727
found=true;
28-
if (msg.gpio[k].value!=0){
28+
if (msg.gpio[k].value==0){
2929
blinkrate=FAST;
3030
}
3131
else{

0 commit comments

Comments
 (0)