Skip to content

Commit

Permalink
platforms: file name and folder unification (#1127)
Browse files Browse the repository at this point in the history
  • Loading branch information
gen2thomas authored Jan 18, 2025
1 parent d5e4ee9 commit c986109
Show file tree
Hide file tree
Showing 69 changed files with 102 additions and 55 deletions.
51 changes: 49 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,59 @@ a driver or platform with changed API.
To prevent this scenario for most users, the main version will not always increased, but affected drivers and platforms
are listed here and a migration strategy is provided.

## Switch from version 2.4.0 (applications using the gpiod options affected)
## Switch from version 2.4.0 (applications using the gpiod options and some import paths affected)

### RockPi adaptor was moved to radxa folder

For cleanup purposes and future preparation the folders and files were moved. Please search and replace to change the
import path as follows.

```go
// old
...
"gobot.io/x/gobot/v2/platforms/rockpi"
...

// new
...
"gobot.io/x/gobot/v2/platforms/radxa/rockpi"
...
```

### Tinkerboard adaptors were moved to asus folder

For cleanup purposes and future preparation the folders and files were moved. Please search and replace to change the
import path as follows.

```go
// old
...
"gobot.io/x/gobot/v2/platforms/tinkerboard/tinkerboard2"
...

// new
...
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard2"
...

```

```go
// old
...
"gobot.io/x/gobot/v2/platforms/tinkerboard"
...

// new
...
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
...
```

### NanoPi NEO adaptor was moved to friendlyelec folder

With introduce of FriendlyELEC NanoPC-T6 a second adaptor from FriendlyELEC (formerly friendlarm) now exists. Please
search and replace to change the import path as follows.
search and replace to change the import path of nanopi as follows.

```go
// old
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,11 @@ Gobot has a extensible system for connecting to hardware devices. The following
platforms are currently supported:

- [Arduino](http://www.arduino.cc/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/firmata)
- [ASUS Tinker Board](https://www.asus.com/us/Single-Board-Computer/Tinker-Board/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/asus/tinkerboard)
- [ASUS Tinker Board 2](https://tinker-board.asus.com/series/tinker-board-2.html/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/asus/tinkerboard2)
- Audio <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/audio)
- [Beaglebone Black](http://beagleboard.org/boards) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/beaglebone)
- [Beaglebone PocketBeagle](http://beagleboard.org/pocket/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/beaglebone)
- [BeagleBoard BeagleBone Black](http://beagleboard.org/boards) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/beagleboard/beaglebone)
- [BeagleBoard PocketBeagle](http://beagleboard.org/pocket/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/beagleboard/pocketbeagle)
- [Bluetooth LE](https://www.bluetooth.com/what-is-bluetooth-technology/bluetooth-technology-basics/low-energy) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/bleclient)
- [C.H.I.P](http://www.nextthing.co/pages/chip) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/chip)
- [C.H.I.P Pro](https://docs.getchip.com/chip_pro.html) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/chip)
Expand Down Expand Up @@ -275,15 +277,13 @@ platforms are currently supported:
- [Parrot Minidrone](https://www.parrot.com/us/minidrones) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/parrot/minidrone)
- [Pebble](https://www.getpebble.com/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/pebble)
- [PINE64 ROCK64](https://pine64.org/documentation/ROCK64/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/pine64/rock64)
- [Radxa Rock Pi 4](https://wiki.radxa.com/Rock4/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/rockpi)
- [Radxa Rock Pi 4](https://wiki.radxa.com/Rock4/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/radxa/rockpi)
- [Raspberry Pi](http://www.raspberrypi.org/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/raspi)
- [Serial Port](https://en.wikipedia.org/wiki/Serial_port) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/serialport)
- [Sphero](http://www.sphero.com/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/sphero/sphero)
- [Sphero BB-8](http://www.sphero.com/bb8) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/sphero/bb8)
- [Sphero Ollie](http://www.sphero.com/ollie) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/sphero/ollie)
- [Sphero SPRK+](http://www.sphero.com/sprk-plus) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/sphero/sprkplus)
- [Tinker Board](https://www.asus.com/us/Single-Board-Computer/Tinker-Board/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/tinkerboard)
- [Tinker Board 2](https://tinker-board.asus.com/series/tinker-board-2.html/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/tinkerboard/tinkerboard2)
- [UP2](http://www.up-board.org/upsquared/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/upboard/up2)

Support for many devices that use Analog Input/Output (AIO) have a shared set of drivers provided using
Expand Down
2 changes: 1 addition & 1 deletion drivers/aio/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# AIO

This package provides drivers for [Analog Input/Output (AIO)](https://en.wikipedia.org/wiki/Analog-to-digital_converter)
devices. It is normally used by connecting an adaptor such as [BeagleBone](https://gobot.io/documentation/platforms/beaglebone/)
devices. It is normally used by connecting an adaptor such as [BeagleBone](https://gobot.io/documentation/platforms/beagleboard/beaglebone/)
that supports the needed interfaces for analog devices.

## Getting Started
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# I2C

This package provides drivers for [i2c](https://en.wikipedia.org/wiki/I%C2%B2C)devices. It must be used along with an
adaptor such as [Tinker Board](https://gobot.io/documentation/platforms/tinkerboard/) that supports the needed
adaptor such as [Tinker Board](https://gobot.io/documentation/platforms/asus/tinkerboard/) that supports the needed
interfaces for i2c devices.

## Getting Started
Expand Down
2 changes: 1 addition & 1 deletion drivers/onewire/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 1-wire

This package provides drivers for [1-wire](https://en.wikipedia.org/wiki/1-Wire) devices supported by Linux Kernel w1-gpio
drivers. It must be used along with an adaptor such as [Tinker Board](https://gobot.io/documentation/platforms/tinkerboard/)
drivers. It must be used along with an adaptor such as [Tinker Board](https://gobot.io/documentation/platforms/asus/tinkerboard/)
that supports the needed interfaces for 1-wire devices.

## Getting Started
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard2_direct_pin_bin_counter.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/gpio"
"gobot.io/x/gobot/v2/platforms/adaptors"
"gobot.io/x/gobot/v2/platforms/tinkerboard/tinkerboard2"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard2"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard2_yl40.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard/tinkerboard2"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard2"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_adafruit1109_lcd_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_ads1115.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_adxl345.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_blink.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/gpio"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_bme280.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_bmp280.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_button.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/gpio"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_direct_pin.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/gpio"
"gobot.io/x/gobot/v2/platforms/adaptors"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
4 changes: 2 additions & 2 deletions examples/tinkerboard_ds18b20.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/onewire"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Preparation: see /gobot/system/ONEWIRE.md and /gobot/platforms/tinkerboard/README.md
// Preparation: see /gobot/system/ONEWIRE.md and /gobot/platforms/asus/tinkerboard/README.md
//
// Wiring:
// PWR Tinkerboard: 1 (+3.3V, VCC), 6, 9, 14, 20 (GND)
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Attention! Possibly this will not work, because the current kernel of Tinker-OS 4.4.194 (2021-10-06) needs the
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_grove_lcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_hcsr04.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/gpio"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_hmc5883l.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_mfcrc522gpio.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/spi"
"gobot.io/x/gobot/v2/platforms/adaptors"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_mfcrc522spi.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/spi"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_motor.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/gpio"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_mpl115a2.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_mpu6050.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_pca9533.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_pcf8583_clock.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_pcf8583_counter.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_pcf8591.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/aio"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_servo.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/gpio"
"gobot.io/x/gobot/v2/platforms/adaptors"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_thermalzone.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/aio"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

// Wiring: no wiring needed
Expand Down
2 changes: 1 addition & 1 deletion examples/tinkerboard_yl40.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/i2c"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
)

func main() {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions platforms/asus/tinkerboard/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
Package tinkerboard contains the Gobot adaptor for the ASUS Tinker Board.
For further information refer to tinkerboard README:
https://github.com/hybridgroup/gobot/blob/release/platforms/asus/tinkerboard/README.md
*/
package tinkerboard // import "gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/platforms/adaptors"
"gobot.io/x/gobot/v2/platforms/tinkerboard"
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
"gobot.io/x/gobot/v2/system"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (

"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/gpio"
"gobot.io/x/gobot/v2/platforms/rockpi"
"gobot.io/x/gobot/v2/platforms/radxa/rockpi"
)

func main() {
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit c986109

Please sign in to comment.