mirror of
https://github.com/richardghirst/PiBits.git
synced 2024-11-28 12:24:11 +01:00
Allow servo IDs up to 31 so people can map servo IDs to P1 header pins if they wish.
This commit is contained in:
parent
29ce55de75
commit
3f4804aa90
@ -217,6 +217,12 @@ Servo mapping:
|
||||
4 on P1-15 GPIO-22
|
||||
5 on P1-16 GPIO-23
|
||||
|
||||
If you wanted to refer to the servos by their P1 header pins you could do
|
||||
something like this, which gives you servos 7, 11, 12 and 15 on P1 header
|
||||
pins 7, 11, 12 and 15:
|
||||
|
||||
--p1pins=0,0,0,0,0,0,0,7,0,0,0,11,12,0,0,15
|
||||
|
||||
If you specify both --p1pins and --p5pins, then the order in which you specify
|
||||
them is relevant because servo numbers are allocated in the order the
|
||||
parameters are specified on the command line.
|
||||
|
@ -52,7 +52,9 @@ static char *default_p5_pins = "";
|
||||
#define NUM_P1PINS 26
|
||||
#define NUM_P5PINS 8
|
||||
|
||||
#define MAX_SERVOS 21 // Count of GPIO pins on P1 and P5
|
||||
#define MAX_SERVOS 32 /* Only 21 really, but this lets you map servo IDs
|
||||
* to P1 pins, if you want to
|
||||
*/
|
||||
|
||||
static uint8_t rev1_p1pin2gpio_map[] = {
|
||||
DMY, // P1-1 3v3
|
||||
|
Loading…
Reference in New Issue
Block a user