Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » 4DIAC IDE - BB GPIO
4DIAC IDE - BB GPIO [message #1748065] Fri, 18 November 2016 10:12 Go to next message
paris karachatzis is currently offline paris karachatzisFriend
Messages: 1
Registered: November 2016
Junior Member
Hello,

I would like to make a simple test where I switch a LED light on/off at a Beagle Bone Black (BB). I have looked the documentation and I found the most simple tutorial of the flip flop modified to work for raspberry.

I came accross 2 implementations.

index.php/fa/27627/0/
index.php/fa/27628/0/

The first example uses smth called RPI, from what i could tell it's some sort of support package for the GPIOs, is there something similar?

At the second example there is 1.88.0 (busChannel.deviceNumber.portNumber) could somone explain me how to translate those to the pins of the BB?

Also at the TraficLight example has some QX blocks and at PARAMS instead of numerical values they have %CarRedOuput%. Is that some defined string? If so where can i find the definition?

Any other simpler way i can controll the GPIO of the BB (from 4diac)

Thanks
Re: 4DIAC IDE - BB GPIO [message #1748121 is a reply to message #1748065] Fri, 18 November 2016 16:11 Go to previous messageGo to next message
Herwig Eichler is currently offline Herwig EichlerFriend
Messages: 18
Registered: February 2016
Junior Member
Hi,
RPI is just short for the Raspberry Pi and it is no GPIO support package. The first implementation in your screenshots is exactly the way you should do it on the Beaglebone Black (BBB).
The easiest way to use the GPIO interface of the BBB is the SYSFS interface of FORTE. You need to compile FORTE for the BBB and activate the SYSFS module in the CMAKE configuration.
You can use the IX Blocks for reading the GPIO pin and QX for writing to it (e.g. switch a LED on or off).
The PARAM should be the GPIO pin number you connected your LED to (e.g. BBB connector P8 pin 20 is GPIO pin number 63).
I don't know the Raspberry SPS very well, but if I'm not much mistaken, it uses GPIO port expanders via I2C interface, so the PARAM 1.88.0 should match the 1st I2C bus, device with I2C address 88 (the GPIO port expander chip) and the channel on the chip.

hope it helps
Herwig

PS: if you need some more detailed information about the BBB hardware and programming I can definitely recommend the book of Derek Molloy called Exploring Beaglebone.

PPS: make sure, that you don't connect the LED without a current limiting resistor, otherwise the BBB might be damaged. The GPIO pins operate at 3,3V level and can stand a couple of mA current only.

[Updated on: Fri, 18 November 2016 17:44]

Report message to a moderator

Re: 4DIAC IDE - BB GPIO [message #1748164 is a reply to message #1748121] Sat, 19 November 2016 23:00 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 523
Registered: January 2014
Senior Member
Hi,

To add to Herwigs answer everywhere where you see some paramters enclosed in % signs it means that this is a placeholder variable. In the bottom of the 4diac-ide window where the property sheet usually is located you will find a tab named virtual dns there you can find the value with wich this %-variable will be replaced during download. This can be of help when you are switching deployment targets.

Cheers,
Alois

Previous Topic:Forte as Static Library
Next Topic:Setting up FBRT
Goto Forum:
  


Current Time: Mon May 21 18:35:28 GMT 2018

Powered by FUDForum. Page generated in 0.02012 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top