Notifications
Clear all

BeagleBone Black

2 Posts
1 Users
0 Likes
1,011 Views
VE1DX
(@ve1dx)
Member
Joined: 5 years ago
Posts: 143
Topic starter  

While we seem to be dedicated to Arduinos of various types and Raspberry Pi SBCs. Has anyone used a BeagleBone Black? Are they widely used enough that Bill might consider a video on one? I've been tinkering with one, and it is impressive. It's forced me to learn rudimentary Python, and that itself is worth it.

If anyone (at least from a Canadian perspective) is interested in getting one, you can buy them from Mouser for about $50-60 less than Amazon. Other suppliers may do better, but I got mine for less than $100 CDN. This is preloaded with Debian, and you can run it headless and set up a VNC connection to access it from Mac OS X, Linux or Windows (I haven't tried Windows, but I would imagine all you need is a VNC viewer like RealVNC.)

 

- Paul VE1DX


   
Quote
VE1DX
(@ve1dx)
Member
Joined: 5 years ago
Posts: 143
Topic starter  

Something to try if anyone does get one of these boards.

- Paul VE1DX

 

#
# How to write an ISR (a 'callback' in Python speak) in Python 3.7.3 on a
# ARM Element 14 BeagleBone Black Rev C - 4GB running Debian Buster IoT
# image 2020-04-06. I'm pretty sure this general concept will work on a
# Raspberry Pi, but I haven't tried it.
#
# We need to use the Adafruit GPIO library for the BeagleBone Black. This is typically
# pre-installed with the O/S. If not, instructions for doing so are found here:
#
# https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/installation-on-ubuntu
# (Link says ubuntu, but it also covers Debian. Also substitute pip3 and python3 for pip and python
#
# Paul M Dunphy, VE1DX - 2021-06-26
#

import Adafruit_BBIO.GPIO as GPIO
import time
times=0
bounce=40
#
# The right header is designated as P8 and the left is designated P9
# I am using header P9 and pin 12, a/k/a GPIO_60
#
Pin = "P9_12"

def ISR_P9_12(channel): # This is the ISR that's invoked when a pulse is detected
global times
times = times + 1
print("Pulse ", times," detected on pin ",channel,sep="")
#
# Clear the interrupt and re-enable it for the next time
#
GPIO.remove_event_detect(Pin)
time.sleep(0.1)
GPIO.add_event_detect(Pin, GPIO.RISING, callback=ISR_P9_12, bouncetime=bounce)

 

#
# Initial set up of the ISR to fire on the rising edge of a pulse applied to GPIO bank P9, pin 12
#
GPIO.setup(Pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.add_event_detect(Pin, GPIO.RISING, callback=ISR_P9_12, bouncetime=bounce)

 

#
# Main loop. Do nothing but wait for button presses. Useful code could
# replace the 'pass' statement
#
try:
print("Press the button. I'm counting them, Use ctrl-C to exit.")
while True:
pass
except KeyboardInterrupt:
print()
print("Keyboard interrupt")
print()
print("Detected",times,"button presses")
GPIO.cleanup()
print("GPIO Cleaned")


   
ReplyQuote