Go-turing-i2c-cmdline - Controlling the i2c management bus of the turing pi with i2c works fine

go-turing-i2c-cmdline

What is it?

Controlling the i2c management bus of the turing pi with i2c works fine. But it's not easy to remember the correct bit mask for the node. So this commandline easens a little the pain :-)

It's just a wrapper around i2c.

Enable i2c management bus access

see: https://docs.turingpi.com/cluster-management-bus-i2c

Build

go build

How to use

When you run this cmdline from a turing pi node you need to 'lock' this node. Without it you can easily turn off the node where you're running the cmdline(and lock you out)

Node numbering starts with 1

We use the env var TPI_LOCKED_NODES for it. It make sense to place it in /etc/profile.d/locked_nodes.sh

cat /etc/profile.d/locked_nodes.sh
#!/bin/bash
export TPI_LOCKED_NODES="NODENUMBER"

e.g. ignore 1 and 4 for commands

#!/bin/bash
export TPI_LOCKED_NODES="1,4"
# turn off node 2
go-turing-i2c-cmdline turnOff 2
# turn on node 3
go-turing-i2c-cmdline turnOn 3

# turn off all nodes(except locked nodes)
go-turing-i2c-cmdline turnOffAll
# turn on all nodes(except locked nodes)
go-turing-i2c-cmdline turnOnAll

State

I've just coded it in 2h and just tested it.

! Use with caution :) !

Resources

https://docs.turingpi.com/cluster-management-bus-i2c

Similar Resources

The primary place where Optimism works on stuff related to Optimistic Ethereum

The primary place where Optimism works on stuff related to Optimistic Ethereum

The Optimism Monorepo TL;DR This is the primary place where Optimism works on stuff related to Optimistic Ethereum. Documentation Extensive documentat

Dec 16, 2022

Works with HashiCorp HCL. Allows to append the input file with blocks and attributes from the template file

About hclmergetool Works with HashiCorp HCL. Allows to append the input file with blocks and attributes from the template file Installation Binary Rel

Feb 6, 2022

Ghdl - A much more convenient way to download GitHub release binaries on the command line, works on Win & Unix-like systems

ghdl Memorize ghdl as github download ghdl is a fast and simple program (and als

Oct 12, 2022

literature management for bio programmers

literature management for bio programmers

literature management for bio programmers

Oct 24, 2022

Complete container management platform

Rancher Rancher is an open source project that provides a container management platform built for organizations that deploy containers in production.

Jan 8, 2023

An unified key management system to make life easier.

An unified key management system to make life easier.

Safebox An unified key management system to make life easier. The main goal of safebox is to make key backup easier with single main key to derive the

Nov 15, 2022

Transaction management tool for taxable investments

Market Lot Robot Transaction management tool for taxable investments. How it works Run the web socket server with the following command: go run . Visi

Oct 19, 2021

Small proof of concept project to try temporal.io with Dispatch Incident Management from Netflix.

Small proof of concept project to try temporal.io with Dispatch Incident Management from Netflix.

temporal-dispatch-poc Small POC project to try out the Temporal workflow engine together with Netflix's Dispatch Incident Management System. Supported

Nov 12, 2021

🕕Todo management through emails

🕕Todo management through emails

🕕Todo management through emails

Nov 15, 2021
Gitfofo - A cmdline tool utilized github api which can help you to explore your tech boundaries
Gitfofo - A cmdline tool utilized github api which can help you to explore your tech boundaries

why gitfofo gitfofo is a cmdline tool utilized github api which can help you to explore your tech boundaries, find more interest people in github. The

Nov 21, 2022
A fine gadget

go-ipldtool The multipurpose tool for wrangling data. IPLD is a data interchange standard, with emphasis on utility in the decentralized web. The ipld

Dec 9, 2022
Keyboard-backlight - A utility for controlling keyboard backlight for System 76 computers

keyboard-backlight A utility for setting keyboard backlight on System 76 devices

Jan 12, 2022
Go application for controlling MuteSync button

goser This is a brief bit of hacking on the MuteSync button so that I could work out and prototype some alternate switching and illumination. Thanks t

Oct 17, 2022
Native Go bindings for D-Bus

go.dbus go.dbus is a simple library that implements native Go client bindings for the D-Bus message bus system. Features Complete native implementatio

Nov 20, 2022
Sensirion SCD30 CO2 sensor i2c driver module for Golang

Sensirion SCD30 CO2 sensor i2c driver module for Golang Overview With this module Sensirion SCD30 CO2 sensor can be accessed throug i2c bus. Implement

Oct 9, 2022
A go driver for the adafruit I2C 7 Segment display

A go driver for the adafruit I2C 7 Segment display

Nov 21, 2021
Some plain Go/Golang i2c sensor bindings to Waveshare Sense HAT for raspberry pi

i2c some plain Go/Golang i2c sensor bindings to Waveshare Sense HAT for raspberry pi using https://periph.io Supported hardware: Raspberry Zero W 1 ht

Dec 31, 2021
A simple LCD controller package for raspberry pi liquid crystal I²C displays.

A simple LCD controller package for raspberry pi liquid crystal I²C displays.

Nov 1, 2022
Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.
  Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.

gore Yet another Go REPL that works nicely. Featured with line editing, code completion, and more. (Screencast taken with cho45/KeyCast) Usage gore Af

Jan 7, 2023