Translate

The Raspberry Pi Diaries


Jan 19 2016


Part 2

Not a bad day. Got all of the following working:

  • get_hardware_revision
  • get_pigpio_version
  • initializing a pigpio session
  • configuring a pin for digital input
  • registering a callback
  • monitoring the pin for changes
  • releasing PIGPIO resources upon exit.
  • able to edit on my pc in Pycharm and upload changes to Raspberry Pi and download any changes made on the Raspberry Pi back to Pycharm
Not Accomplished:
  • I need to refresh my memory on how to configure Pycharm for remote debugging. Time to check my notes from 2 years ago ;-).

Here is the output from the run:

pi@raspberrypi:~/xideco/xideco/xideco/raspberrypi_bridge$ python3 xirb.py
board num: 1
HW REV: 14
PIGPIO REV: 43
11 1 1685339352
11 0 1685437103
^Cdone done
cleaning up
pi@raspberrypi:~/xideco/xideco/xideco/raspberrypi_bridge$ 

The output that starts with "11" is from the callback.  I have a pibrella hooked up and it has a switch on pin 11 (BCM). You can see the value going to 1 and then to a 0. The value "1685339352" is a time stamp provided by the callback.

No comments:

Post a Comment