예제 #1
0
import sys
sys.path.append('Library/')
from raspiomix import Raspiomix
import RPi.GPIO as GPIO
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)  # mode de fonctionnement GPIO
GPIO.setup(Raspiomix.IO0, GPIO.IN)  # configure port en sortie

r = Raspiomix()
ENTREE_CAN = 1

while True:
    print("La tension est de %f volt !" % r.readAdc(ENTREE_CAN))
    time.sleep(0)
#!/usr/bin/python

import curses
import random
import string
import smbus
from copy import copy
from time import sleep

from raspiomix import Raspiomix
import serial
import RPi.GPIO as GPIO

raspi = Raspiomix()
IS_PLUS = raspi.isPlus()

info = None

GPIOS = (
    Raspiomix.IO0,
    Raspiomix.IO1,
    Raspiomix.IO2,
    Raspiomix.IO3,
)

if IS_PLUS:
    GPIOS += (
        Raspiomix.IO4,
        Raspiomix.IO5,
        Raspiomix.IO6,
        Raspiomix.IO7,