diff --git a/examples/firmata_neopixels.go b/examples/firmata_neopixels.go index 6ce28f0c..5bdb50fc 100644 --- a/examples/firmata_neopixels.go +++ b/examples/firmata_neopixels.go @@ -15,7 +15,7 @@ import ( func main() { firmataAdaptor := firmata.NewAdaptor("/dev/ttyACM0") led := gpio.NewLedDriver(firmataAdaptor, "13") - neo := gpio.NewNeopixelDriver(firmataAdaptor, "6", 5) + neo := firmata.NewNeopixelDriver(firmataAdaptor, "6", 5) work := func() { cols := []uint32{0xff0000, 0x00ff00, 0x0000ff, 0xffff00, 0xffffff} diff --git a/drivers/gpio/neopixel_driver.go b/platforms/firmata/neopixel_driver.go similarity index 93% rename from drivers/gpio/neopixel_driver.go rename to platforms/firmata/neopixel_driver.go index a9ab7ad2..51ee7a5d 100644 --- a/drivers/gpio/neopixel_driver.go +++ b/platforms/firmata/neopixel_driver.go @@ -1,10 +1,9 @@ -package gpio +package firmata import ( "strconv" "gobot.io/x/gobot" - "gobot.io/x/gobot/platforms/firmata" ) const ( @@ -28,12 +27,12 @@ type NeopixelDriver struct { name string pin string pixelCount uint16 - connection *firmata.Adaptor + connection *Adaptor gobot.Eventer } // NewNeopixelDriver returns a new NeopixelDriver -func NewNeopixelDriver(a *firmata.Adaptor, pin string, pixelCount uint16) *NeopixelDriver { +func NewNeopixelDriver(a *Adaptor, pin string, pixelCount uint16) *NeopixelDriver { neo := &NeopixelDriver{ name: gobot.DefaultName("Neopixel"), connection: a,