From df8697ef16fd56af4690b3cc85ab50d80dd60a43 Mon Sep 17 00:00:00 2001 From: MiracelVip Date: Sun, 19 Nov 2017 12:56:49 +0100 Subject: [PATCH] Import of RPi.GPIO is missing --- Custom-Actor.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Custom-Actor.md b/Custom-Actor.md index fdc038c..7bc5d77 100644 --- a/Custom-Actor.md +++ b/Custom-Actor.md @@ -5,6 +5,15 @@ from modules import cbpi from modules.core.props import Property from modules.core.hardware import ActorBase +try: + import RPi.GPIO as GPIO + + GPIO.setmode(GPIO.BCM) +except Exception as e: + print e + pass + + @cbpi.actor class SampleActor(ActorBase): #custom property