Now you are done, you can use our Circus commands.
Remember when you access your raspi GPIO pins that these have to be set as input/output in accordance with the command you are going to run. For instance, if your are going to write what is shown in a signal in Circus to your GPIO 8 using circussignaltopin command, GPIO 8 has to be set as an output
Setting GPIOs as input/output from command line is clearly described here
But, you can also use the -F option from commands. In that case, you should run them preceeded by sudo -E
Example: Reading a signal value
Just read the temperature in Celsius degrees in Madrid, as we have a device feeding the signal with key 943874351
pi@raspberry:~ $ circusreadsignal -k 943874351
18
Example: Posting some value on a signal at Circus
I use it to post my deposit desired level on 110cm at the signal with key=137572561 and my pump controller will read it there to fix it
pi@raspberry:~ $ circuswritesignal -k 137572561 -n 110
Example: Binding from a Circus signal to a local GPIO pin
Will show wheter is raining or not in Madrid flashing a led in my local GPIO 6. Note that -F option will force GPIO 6 to be an output.
pi@raspberry:~ $ sudo -E circussignaltopin -v -F -k 830339759 -p 6
cat: /sys/class/gpio/gpio6/direction: File does not exist
GPIO port 6 is not set as an output
Forcing GPIO as an output, as -F option was selected
Attempting to bind signal at circusofthings.com to your pin -GPIO: 6- in your Respberry
[ Read from Key: 830339759 ] 0 -> [ GPIO 6 ]
[ Read from Key: 830339759 ] 0 -> [ GPIO 6 ]
[ Read from Key: 830339759 ] 0 -> [ GPIO 6 ]
[ Read from Key: 830339759 ] 0 -> [ GPIO 6 ]
[ Read from Key: 830339759 ] 0 -> [ GPIO 6 ]
[ Read from Key: 830339759 ] 0 -> [ GPIO 6 ]
Now, we try just the same but setting port mannually
pi@raspberry:~ $ sudo echo "6" > /sys/class/gpio/export
pi@raspberry:~ $ sudo echo "out" > /sys/class/gpio/gpio6/direction
pi@raspberry:~ $ circussignaltopin -v -k 830339759 -p 6
GPIO port 6 is an output. Ok
Attempting to bind signal at circusofthings.com to your pin -GPIO: 6- in your Respberry
[ Read from Key: 830339759 ] 0 -> [ GPIO 6 ]
[ Read from Key: 830339759 ] 0 -> [ GPIO 6 ]
[ Read from Key: 830339759 ] 0 -> [ GPIO 6 ]
[ Read from Key: 830339759 ] 0 -> [ GPIO 6 ]
[ Read from Key: 830339759 ] 0 -> [ GPIO 6 ]
Example: Binding from local GPIO pin to a Circus signal
This is the code I use to feed my signal Is it rainning in Algaida? from the open/closed contact of my rain sensor connected to my Raspberry on GPIO 4
pi@reconada-pi-1:~ $ circuspintosignal -v -k 16320557 -p 4
GPIO port 4 is an input. Ok
Attempting to bind signal -key: 16320557- at circusofthings.com to your pin -GPIO: 4- in your Respberry
[ Read from GPIO 4 ] 0 -> [ Signal Key: 16320557 ]
[ Read from GPIO 4 ] 0 -> [ Signal Key: 16320557 ]
[ Read from GPIO 4 ] 0 -> [ Signal Key: 16320557 ]
[ Read from GPIO 4 ] 0 -> [ Signal Key: 16320557 ]