Skip to content

Commit 56fe416

Browse files
committed
Merge branch 'release/version-1.6.0'
2 parents 0be3e7e + c089e8f commit 56fe416

11 files changed

Lines changed: 408 additions & 209 deletions

File tree

README.md

Lines changed: 41 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,53 +24,63 @@ void loop() {}
2424

2525
### List of commands
2626

27-
| | Functions name | Parameter(s) | Return value |
28-
| ------------ | -------------------------------------------- | ------------------------------ | -------------------------- |
29-
| **Sensor** | `readInput(`**param**`)` | port number (1,2,3,4) | sensor value (0-1023) |
27+
| | Functions name | Parameter(s) | Return value |
28+
| ------------ | ----------------------------------------------- | ------------------------------ | -------------------------- |
29+
| **Sensor** | `readInput(`**param**`)` | port number (1,2,3,4) | sensor value (0-1023) |
3030
| |
31-
| **Servo** | `talkToServo(`**"param"**`)` | port name (1,2,3,4) | - |
32-
| | `talkToServo(`**param**`)` | port number (1,2,3,4) | - |
33-
| | `setServoHead(`**param**`)` | servo angle (0-180) | - |
34-
| | `setServoThisWay(`**param**`)` | servo angle (0-180) | - |
35-
| | `setServoThatWay(`**param**`)` | servo angle (0-180) | - |
36-
| | `setServoPower(`**param**`)` | servo power (0-100) | - |
31+
| **Servo** | `talkToServo(`**"param"**`)` | port name (1,2,3,4) | - |
32+
| | `talkToServo(`**param**`)` | port number (1,2,3,4) | - |
33+
| | `setServoHead(`**param**`)` | servo angle (0-180) | - |
34+
| | `setServoThisWay(`**param**`)` | servo angle (0-180) | - |
35+
| | `setServoThatWay(`**param**`)` | servo angle (0-180) | - |
36+
| | `setServoPower(`**param**`)` | servo power (0-100) | - |
3737
| |
38-
| **Output** | `talkToOutput(`**"param"**`)` | port name (1,2,3,4) | - |
39-
| | `talkToOutput(`**param**`)` | port number (1,2,3,4) | - |
40-
| | `setOutputPower(`**param**`)` | power value (0-100) | - |
41-
| | `turnOutputON()` | - | - |
42-
| | `turnOutputOFF()` | - | - |
43-
| | `turnOutputONOFF(`**param**`)` | on-off status (1=on, 0=off) | - |
44-
| | `turnOutputThisWay()` | - | - |
45-
| | `turnOutputThatWay()` | - | - |
46-
| | `toggleOutputWay()` | - | - |
47-
| | `turnOutputDirection(`**param**`)` | direction number (1=CW, 0=CCW) | - |
38+
| **Output** | `talkToOutput(`**"param"**`)` | port name (1,2,3,4) | - |
39+
| | `talkToOutput(`**param**`)` | port number (1,2,3,4) | - |
40+
| | `setOutputPower(`**param**`)` | power value (0-100) | - |
41+
| | `turnOutputON()` | - | - |
42+
| | `turnOutputOFF()` | - | - |
43+
| | `turnOutputONOFF(`**param**`)` | on-off status (1=on, 0=off) | - |
44+
| | `turnOutputThisWay()` | - | - |
45+
| | `turnOutputThatWay()` | - | - |
46+
| | `toggleOutputWay()` | - | - |
47+
| | `turnOutputDirection(`**param**`)` | direction number (1=CW, 0=CCW) | - |
4848
| |
49-
| **Sound** | `beep()` | - | - |
49+
| **Sound** | `beep()` | - | - |
5050
| |
51-
| **Gmessage** | `sendGmessage(`**"param"**`, `**param**`)` | key, number value | - |
52-
| | `sendGmessage(`**"param"**`, `**"param"**`)` | key, string value | - |
53-
| | `isGmessageAvailable(`**"param"**`)` | key | new message ? (true/false) |
54-
| | `Gmessage(`**"param"**`, `**"param"**`)` | key, default string value | string message |
55-
51+
| **Gmessage** | `sendGmessage(`**"param"**`, `**param**`)` | key, number value | - |
52+
| | `sendGmessage(`**"param"**`, `**"param"**`)` | key, string value | - |
53+
| | `isGmessageAvailable(`**"param"**`)` | key | new message ? (true/false) |
54+
| | `Gmessage(`**"param"**`, `**"param"**`)` | key, default string value | string message |
55+
| |
56+
| **IoT** | `connectToWifi(`**"param"**`, `**"param"**`)` | Wi-Fi name, Wi-Fi password | - |
57+
| | `setBroadcastChannel(`**param**`)` | channel number | - |
58+
| | `setBroadcastPassword(`**"param**"`)` | password string | - |
59+
| | `sendBroadcast(`**"param"**`)` | broadcast name | - |
60+
| | `receiveBroadcast(`**"param"**`)` | broadcast name | new message ? (true/false) |
61+
| | `sendCloudMessage(`**"param"**`, `**"param"**`)`| topic, string value | - |
62+
| | `isCloudMessageAvailable(`**"param"**`)` | topic | new message ? (true/false) |
63+
| | `Cloudmessage(`**"param"**`, `**"param"**`)` | topic, default string value | string message |
5664
---
5765

5866
### List of pins definition (Alias names)
5967

6068
| Alias names | Arduino pins |
6169
| ------------------ | ------------ |
62-
| `GOGO_SPECIAL_D11` | PA0 |
63-
| `GOGO_SPECIAL_D12` | PA1 |
64-
| `GOGO_SPECIAL_D21` | PA2 |
65-
| `GOGO_SPECIAL_D22` | PA3 |
6670
| `GOGO_SPECIAL_SCL` | PB6 |
6771
| `GOGO_SPECIAL_SDA` | PB7 |
72+
| `GOGO_SPECIAL_D21` | PB8 |
73+
| `GOGO_SPECIAL_D22` | PB9 |
74+
| `GOGO_SPECIAL_D31` | PB10 |
75+
| `GOGO_SPECIAL_D32` | PB11 |
6876
| | |
69-
| `GOGO_GPIO_RX` | PB11 |
70-
| `GOGO_GPIO_TX` | PB10 |
77+
| `GOGO_GPIO_RX2` | PA3 |
78+
| `GOGO_GPIO_TX2` | PA2 |
7179
| `GOGO_GPIO_MOSI` | PA7 |
7280
| `GOGO_GPIO_MISO` | PA6 |
7381
| `GOGO_GPIO_SCK` | PA5 |
7482
| `GOGO_GPIO_NSS` | PA4 |
83+
| `GOGO_GPIO_SCL` | PB6 |
84+
| `GOGO_GPIO_SDA` | PB7 |
7585

7686
---
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
#include <GoGoBoardArduino.h>
22

3-
GoGoBoardArduino gogoIO;
4-
53
void setup()
64
{
7-
gogoIO.begin();
5+
GoGoBoard.begin();
86
}
97

108
void loop()
119
{
12-
gogoIO.beep();
10+
GoGoBoard.beep();
1311
delay(1000);
1412
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include <GoGoBoardArduino.h>
2+
3+
void setup()
4+
{
5+
GoGoBoard.begin();
6+
GoGoBoard.connectToWifi("<wifi name>", "<wifi password>");
7+
}
8+
9+
void loop()
10+
{
11+
//? checking other gogoboard to broadcast `gogo-beep`, when received sound the beeper
12+
if (GoGoBoard.receiveBroadcast("gogo-beep"))
13+
{
14+
GoGoBoard.beep();
15+
}
16+
delay(100);
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include <GoGoBoardArduino.h>
2+
3+
void setup()
4+
{
5+
GoGoBoard.begin();
6+
GoGoBoard.connectToWifi("<wifi name>", "<wifi password>");
7+
}
8+
9+
void loop()
10+
{
11+
//? retrieve light sensor value from other gogoboard via topic `gogo-light-sensor`
12+
if (gogoIO.isCloudMessageAvailable("gogo-light-sensor"))
13+
{
14+
Serial.println(gogoIO.Cloudmessage("gogo-light-sensor"));
15+
}
16+
delay(100);
17+
}
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
#include <GoGoBoardArduino.h>
22

3-
GoGoBoardArduino gogoIO;
4-
53
void setup()
64
{
7-
gogoIO.begin();
5+
GoGoBoard.begin();
86
Serial.begin(115200);
97
}
108

119
void loop()
1210
{
1311
//? echo Gmessage from GoGoBoard on `greeting` key and show the message on serial monitor
14-
if (gogoIO.isGmessageAvailable("greeting"))
12+
if (GoGoBoard.isGmessageAvailable("greeting"))
1513
{
16-
gogoIO.sendGmessage("greeting", gogoIO.Gmessage("greeting"));
14+
GoGoBoard.sendGmessage("greeting", GoGoBoard.Gmessage("greeting"));
1715

1816
Serial.print("message: ");
19-
Serial.println(gogoIO.Gmessage("greeting"));
17+
Serial.println(GoGoBoard.Gmessage("greeting"));
2018
}
2119
}
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
#include <GoGoBoardArduino.h>
22

3-
GoGoBoardArduino gogoIO;
4-
53
void setup()
64
{
7-
gogoIO.begin();
5+
GoGoBoard.begin();
86
Serial.begin(115200);
97
}
108

119
void loop()
1210
{
1311
//? read input port 1 and show value on serial monitor every 1 second
14-
Serial.println(gogoIO.readInput(1));
12+
Serial.println(GoGoBoard.readInput(1));
1513
delay(1000);
1614
}
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
#include <GoGoBoardArduino.h>
22

3-
GoGoBoardArduino gogoIO;
4-
53
void setup()
64
{
7-
gogoIO.begin();
5+
GoGoBoard.begin();
86

97
//? turn on output port 1 and 2
10-
gogoIO.talkToOutput("12");
11-
gogoIO.turnOutputON();
8+
GoGoBoard.talkToOutput("12");
9+
GoGoBoard.turnOutputON();
1210
}
1311

1412
void loop()
1513
{
1614
//? toggle motor direction every 5 seconds
17-
gogoIO.toggleOutputWay();
15+
GoGoBoard.toggleOutputWay();
1816
delay(5000);
1917
}

keywords.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
#######################################
2-
# Syntax Coloring Map For GoGoBoard
2+
# Syntax Coloring Map For GoGoBoardArduino
33
#######################################
44

55
#######################################
66
# Datatypes (KEYWORD1)
77
#######################################
88

9-
GoGoBoard KEYWORD1
109
GoGoBoardArduino KEYWORD1
1110

1211
#######################################
@@ -30,6 +29,14 @@ turnOutputThatWay KEYWORD2
3029
turnOutputDirection KEYWORD2
3130
toggleOutputWay KEYWORD2
3231
beep KEYWORD2
32+
connectToWifi KEYWORD2
3333
sendGmessage KEYWORD2
3434
isGmessageAvailable KEYWORD2
3535
Gmessage KEYWORD2
36+
setBroadcastChannel KEYWORD2
37+
setBroadcastPassword KEYWORD2
38+
sendBroadcast KEYWORD2
39+
receiveBroadcast KEYWORD2
40+
sendCloudMessage KEYWORD2
41+
isCloudMessageAvailable KEYWORD2
42+
Cloudmessage KEYWORD2

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=GoGoBoard Arduino Library
2-
version=1.5.0
2+
version=1.6.0
33
author=P.Pongpakatien, T.Phoeyphon
44
maintainer=LILCMU <peeranut32@gmail.com>
55
sentence=A library for built-in STM32 arduino core on GoGoBoard to enabled fully functional of hardware along with the used of students.

0 commit comments

Comments
 (0)