You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: programming/arduino/custom_firmware.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,9 @@ By default when the `robot` object is created it will try to communicate with al
17
17
If you want the API to not try connecting to a device we need to *ignore* the Arduino.
18
18
19
19
To configure a `Robot` object to ignore a Arduino with custom firmware, you will need to provide it with the Arduino's serial number.
20
-
The Arduino serial number is a character string of numbers and letters, and is output in the robot log when you run a program on your robot with your
21
-
Arduino connected.
20
+
The Arduino serial number is a string of numbers and letters, and is output in the robot log when you run a program on your robot with your Arduino connected.
22
21
23
-
You'll need the ID later, so it's best to save it into a variable:
22
+
You'll need the serial number later, so it's best to save it into a variable:
24
23
25
24
~~~~~python
26
25
from sr.robot3 import*
@@ -86,6 +85,7 @@ Putting a `b` in front of a string is a short hand way of creating a bytes objec
86
85
87
86
~~~~~python
88
87
# This will send the message "data" over the serial port
88
+
# The b in front of the string is not a typo, this is a byte string
Copy file name to clipboardExpand all lines: programming/arduino/index.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ title: Arduino API
7
7
8
8
The Arduino that came as part of your kit was shipped with a firmware that provides the functionality outlined in the [Arduino API](/docs/programming/arduino/sr_firmware) page.
9
9
You may wish to use the Arduino as is, extend the functionality of this firmware, or completely replace it.
10
+
You can also add your own Arduinos, or other boards, to the kit, running either our firmware or your own.
10
11
11
12
The `sr.robot3` library provides support for using the Arduino in three possible configurations:
The analog pin numbers are available as `A0`, `A1`, `A2`, `A3`, `A4`, and `A5` respectively.
98
100
99
101
100
102
## Output
101
103
102
-
You can only set digital outputs (there's no analog_write, although feel free to modify the Arduino's firmware to add the ability to output [PWM](https://wikipedia.org/wiki/Pulse-width_modulation"Pulse-width modulation") if you desire).
104
+
You can only set digital outputs (there's no analog_write, although feel free to modify the Arduino's firmware to add the ability to output [PWM](https://wikipedia.org/wiki/Pulse-width_modulation) (Pulse-width modulation) if you desire).
103
105
To set a digital output pin, you would use the following:
0 commit comments