hybridgroup.gobot/platforms/jetson
Thomas Kohler e2b710bfe7
neurosky: use serialport adaptor and move driver to drivers/serial (#1061)
2024-02-12 16:27:08 +01:00
..
README.md examples: fix missing checks of return values (#1060) 2024-02-11 15:34:50 +01:00
doc.go Build(v2): revert move to v2 subfolder (#932) 2023-05-29 19:23:28 +02:00
jetson_adaptor.go neurosky: use serialport adaptor and move driver to drivers/serial (#1061) 2024-02-12 16:27:08 +01:00
jetson_adaptor_test.go raspi(pwm): add support for sysfs and fix pi-blaster (#1048) 2023-12-11 19:09:00 +01:00
jetson_pin_map.go raspi(pwm): add support for sysfs and fix pi-blaster (#1048) 2023-12-11 19:09:00 +01:00

README.md

Jetson Nano

The Jetson Nano is ARM based single board computer with digital & PWM GPIO, and i2c interfaces built in.

The Gobot adaptor for the Jetson Nano should support Jetno Nano.

For more info about the Jetson Nano platform, click here.

How to Install

Please refer to the main README.md

We recommend updating to the latest jetson-nano OS when using the Jetson Nano, however Gobot should also support older versions of the OS, should your application require this.

How to Use

The pin numbering used by your Gobot program should match the way your board is labeled right on the board itself.

package main

import (
  "time"

  "gobot.io/x/gobot/v2"
  "gobot.io/x/gobot/v2/drivers/gpio"
  "gobot.io/x/gobot/v2/platforms/jetson"
)

func main() {
  r := jetson.NewAdaptor()
  led := gpio.NewLedDriver(r, "40")

  work := func() {
    gobot.Every(1*time.Second, func() {
      if err := led.Toggle(); err != nil {
				fmt.Println(err)
			}
    })
  }

  robot := gobot.NewRobot("blinkBot",
    []gobot.Connection{r},
    []gobot.Device{led},
    work,
  )

  if err := robot.Start(); err != nil {
		panic(err)
	}

}

How to Connect

Compiling

Once you have compiled your code, you can upload your program and execute it on the Jetson Nano from your workstation using the scp and ssh commands like this:

scp jetson-nano_blink jn@192.168.1.xxx:/home/jn/
ssh -t jn@192.168.1.xxx "./jetson-nano_blink"