Esempio n. 1
0
func NewPins(ns ...int) Pins {
	pins := make(Pins, 0)

	for _, n := range ns {
		pin := rpio.Pin(n)
		pin.Output()
		pins = append(pins, pin)
	}

	return pins
}
Esempio n. 2
0
package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
	"os"
	"strconv"
	"time"

	rpio "github.com/stianeikeland/go-rpio"
)

var pins = []rpio.Pin{
	rpio.Pin(4),
	rpio.Pin(17),
	rpio.Pin(22),
	rpio.Pin(5),
	rpio.Pin(6),
	rpio.Pin(19),
	rpio.Pin(21),
	rpio.Pin(16),
	rpio.Pin(12),
	rpio.Pin(25),
	rpio.Pin(23),
	rpio.Pin(18),
}

var tick = time.Second / 15