BeagleBone Green Grove i2c issues

Ok... so I've banged my head about this more and, have made some progress.
THANK YOU for your help thus far.

Still, this are really broken. As an example, the instructions here to blink
an LED don't work. They don't crash, but nothing happens on the board when I
run them. Suggestions?

It is difficult to check your work using the GUI (ie., clicking the
right button). Can you get to the command prompt (right there in
Cloud9 IDE) and do the following and capture the entire terminal
session and paste here?

# cat yourfile.py
# python yourfile.py

On the bright side: Some grove devices now show up in i2cdetect. There are
others that don't. And I can't figure out how to get the non i2c port to
work as gpio (for example the LED example linked to above).

Are you doing 'i2cdetect -y 2' ?

Depending on the kernel, you might be able to use 'config-pin'

Have any of you actually gotten a BBG working with common grove sensors? For
example, the Digital Temp and Humidity sensor (I have the "pro" and the
non-pro versions)? Some example code would be really helpful.

I have. The code shipped with the board worked for me. I'm in process
of pushing it into the bone101 code.

Jason,

Thanks for trying to help. See below.

Ben

I’ve never used Cloud9 and have done everything from within SSH.

In any case, here’s the file:

debian@bonehog:~/making_bbg_work$ cat blink.py
import Adafruit_BBIO.GPIO as GPIO
import time
GPIO.setup(“P9_14”, GPIO.OUT)
while True:
GPIO.output(“P9_14”, GPIO.HIGH)
time.sleep(0.5)
GPIO.output(“P9_14”, GPIO.LOW)
time.sleep(0.5)

Running the script produces no output, either on the console or in the behavior of any of the LEDs.

Yes. The Grove RGB LCD shows up. And I can even issue commands to activate and change the backlight color. But I can’t get any text to appear.

I don’t know what config-pin is. And no file by that name exists on my device.

Code shipped with the board??? Does it exist online somewhere?

Jason,

Thanks for trying to help. See below.

Ben

I’ve never used Cloud9 and have done everything from within SSH.

In any case, here’s the file:

debian@bonehog:~/making_bbg_work$ cat blink.py
import Adafruit_BBIO.GPIO as GPIO
import time
GPIO.setup(“P9_14”, GPIO.OUT)
while True:
GPIO.output(“P9_14”, GPIO.HIGH)
time.sleep(0.5)
GPIO.output(“P9_14”, GPIO.LOW)
time.sleep(0.5)

Running the script produces no output, either on the console or in the behavior of any of the LEDs.

P9_14 is a pin, not one of the built-in LEDs. I’ll ping them to make that clearer.

Yes. The Grove RGB LCD shows up. And I can even issue commands to activate and change the backlight color. But I can’t get any text to appear.

I had a similar challenge, but I think if I2C works, it must be something with the commands themselves. Have you checked out the Python examples? I will check it out myself tomorrow.

Hi Jason,

Which Python examples?

Ben

Ben, in addition to what Jason will tell you . . .

https://github.com/graycatlabs/PyBBIO
Check out the documentation links.

Here is his USR LED blink example.
https://github.com/graycatlabs/PyBBIO/blob/master/examples/blink.py

Trust me though. I know exactly how frustrating it is to get something working on the Beaglebone( sometimes ). As there is a lot of FUD out there, and when you’re inexperienced with various aspects of the hardware. It can make things difficult.

Alexanders code should be good though, and do not be put off that it was originally written for the Beaglebone white. As what works on the White generally works on the Black, and by extension should work on the green too. I’ve been writing code lately using a git project that was original intended for the White. . . But peripheral register addresses, etc I am finding are exactly the same. The grove stuff though . . . I know nothing about.

The majority of issues you’ll run into is: If documentation, or a project is too old, they’ll talk about using Angstrom. Like with Alexanders documentation from the link above covers Angstrom, and Ubuntu / Debian. Disregard the Angstrom bits. His stuff seems to usually be very thorough - though.

The examples should have been pushed into our repo, so I put it in my
repo for now: https://github.com/jadonk/bone101/tree/master/examples/Grove_BBG/Software/Python