jetson

package
v2.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

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() {
      led.Toggle()
    })
  }

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

  robot.Start()

}

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"

Documentation

Overview

Package jetson contains the Gobot adaptor for the Jetson Nano.

For further information refer to Jetson README: https://github.com/hybridgroup/gobot/blob/master/platforms/jetson/README.md

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adaptor

type Adaptor struct {
	*adaptors.DigitalPinsAdaptor
	*adaptors.PWMPinsAdaptor
	*adaptors.I2cBusAdaptor
	*adaptors.SpiBusAdaptor
	// contains filtered or unexported fields
}

Adaptor is the Gobot adaptor for the Jetson Nano

func NewAdaptor

func NewAdaptor(opts ...interface{}) *Adaptor

NewAdaptor creates a Jetson Nano adaptor

Optional parameters:

adaptors.WithGpiodAccess():	use character device gpiod driver instead of sysfs
adaptors.WithSpiGpioAccess(sclk, nss, mosi, miso):	use GPIO's instead of /dev/spidev#.#

Optional parameters for PWM, see [adaptors.NewPWMPinsAdaptor]

func (*Adaptor) Connect

func (a *Adaptor) Connect() error

Connect create new connection to board and pins.

func (*Adaptor) Finalize

func (a *Adaptor) Finalize() error

Finalize closes connection to board and pins

func (*Adaptor) Name

func (a *Adaptor) Name() string

Name returns the Adaptor's name

func (*Adaptor) SetName

func (a *Adaptor) SetName(n string)

SetName sets the Adaptor's name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL