Skip to content

Commit

Permalink
joule: ensure built-in LEDs are labeled same as the expansion board
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed May 9, 2017
1 parent 3568719 commit 7670d2a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/joule_blink.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

func main() {
e := joule.NewAdaptor()
led := gpio.NewLedDriver(e, "100")
led := gpio.NewLedDriver(e, "GP100")

work := func() {
gobot.Every(1*time.Second, func() {
Expand Down
8 changes: 4 additions & 4 deletions examples/joule_leds.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (

func main() {
e := joule.NewAdaptor()
led0 := gpio.NewLedDriver(e, "100")
led1 := gpio.NewLedDriver(e, "101")
led2 := gpio.NewLedDriver(e, "102")
led3 := gpio.NewLedDriver(e, "103")
led0 := gpio.NewLedDriver(e, "GP100")
led1 := gpio.NewLedDriver(e, "GP101")
led2 := gpio.NewLedDriver(e, "GP102")
led3 := gpio.NewLedDriver(e, "GP103")

work := func() {
led0.Off()
Expand Down
4 changes: 2 additions & 2 deletions platforms/intel-iot/joule/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (

func main() {
e := joule.NewAdaptor()
led := gpio.NewLedDriver(e, "103")
led := gpio.NewLedDriver(e, "GP103")

work := func() {
gobot.Every(1*time.Second, func() {
Expand Down Expand Up @@ -87,6 +87,6 @@ The Gobot pin mapping for the Intel Joule uses a naming system based on how the

There are 2 jumpers on the Joule expansion board, labeled "J12" and "J13". There are 2 rows of pins on each jumper, labeled from 1 to 40. So to use the 26th pin of jumper J12, you use pin name "J12_26".

In addition, there are pins that control the build-in LEDs (pins 100 thru 103) as used in the example above.
In addition, there are pins that control the build-in LEDs (pins GP100 thru GP103) as used in the example above.

The i2c interfaces on the Intel Joule developer kit board require that you terminate the SDA & SCL lines using 2 10K resistors pulled up to the voltage used for the i2c device, for example 5V.
12 changes: 6 additions & 6 deletions platforms/intel-iot/joule/tuchuck_pinmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,32 +406,32 @@ var sysfsPinMap = map[string]sysfsPin{

// Built-in LEDs
// LED100
"100": {
"GP100": {
pin: 337,
pwmPin: -1,
},
// LED101
"101": {
"GP101": {
pin: 338,
pwmPin: -1,
},
// LED102
"102": {
"GP102": {
pin: 339,
pwmPin: -1,
},
// LED103
"103": {
"GP103": {
pin: 340,
pwmPin: -1,
},
// LEDWIFI
"104": {
"GP104": {
pin: 438,
pwmPin: -1,
},
// LEDBT
"105": {
"GP105": {
pin: 439,
pwmPin: -1,
},
Expand Down

0 comments on commit 7670d2a

Please sign in to comment.