BeagleBoard Black (BBB) and GPIO

When you buy a Beagleboard Black (a.k.a. BBB), it comes with a pre-installed version of debian with more or less everything you need to get started. I purchased the board for another purpose and develop seL4 components on top of it. But before starting to develop on seL4, it is useful to know exactly how the board works: once you know how the board works, you can start to write your code and know for sure that the bug comes from your code.

In this article, I will explain quickly how to set up a simple circuit to test the GPIO of the beaglebone.

Mapping between pin numbers and GPIO ID from bone 101

Setting up the circuit

To test the circuit, you need only a breadboard, a resistance and a LED. Simple.

Connect the PIN 14 (which is mapped to GPIO id 50, see table) from bank P9 (green cable on the picture) on the breadboard. Connect it to a resistance and a LED. The other pin of the LED is then connected to the ground (last PIN of P9).

Wiring scheme of the example


Controlling the GPIO in Linux

In Linux, the GPIO can be controlled using the SysFS abstraction layer. You can access it through /sys/class/gpio. I am using the pre-installed debian software on the board.

To control a particular pin, you must export it. You do it by writing the value of the pin you want to export into /sys/class/gpio/export. Then, a new directory is /sys/class/gpio/gpio<PIN-NUMBER> is created with many different files to control the pin (direction, value, etc.).

In our example, the pin 14 from the bank P9 correspond to GPIO 50. You can see the corresponding mapping between the pin and GPIO number in the beaglebone 101 document.

So, let’s start by exporting this pin:

echo 50 > /sys/class/gpio/export

Then, a new directory /sys/class/gpio/gpio50 is created.

Let’s set its direction to out

echo out > /sys/class/gpio/gpio50/direction

And let’s set its value to 1

echo 1 > /sys/class/gpio/gpio50/value


And finally, if you want to make the LED blinks every second, you can use this command:

while [ 1 ]; do echo 1 > /sys/class/gpio/gpio50/value ; sleep 1 ; echo 0 > /sys/class/gpio/gpio50/value ; sleep 1 ; done




BeagleBoard Black (BBB) and GPIO

Shame on you WS100

Western States 100 added a new rule in order that deny race entry to any athlete who has been caught using performance-enhancing drugs from competing in Western States.

What a shame.

Armstrong did not even mention he wanted to run this race. He runs every now and then (his strava profile is very active) and recently won a trail race. But he did not sign up for the race.

The organizers reacted over a non-existing threat. Just by fear. Or just to make noise.

But why banning him? This sport is all about community, not about rejection. We are a welcoming community. How many of us struggled with life, suffered from various addictions and find salvation through ultra running? How many stories of people stopping drinking, doing drugs or losing weight that stopped when they start running? Armstrong wants to join us? He is more than welcome. There is no reason to reject him.

There are many solutions to offer a fair treatment if he is running: enable drug testing during the race (for every runner – let’s be serious: some elites are using performance enhancing drugs, why not testing them?) or just let him to race without receiving an award/money. But there is no reason to reject somebody without trying to work things out. And by taking such a decision, the race organizers might have show that our sport is slowly evolving … probably not for the best.

Shame on you WS100

Paris Charles de Gaulle Airport: a metaphor of the evolution of France

As a researcher working with an international standard committee, publishing papers and attending international conferences, I travel a lot. I often visit Europe, and, coming from the USA, the Paris Charles de Gaulle (CDG) airport is where I take most of my connecting flights. Last, as a french-native, I sometimes come back in the country to visit my family and then, land at this airport.

The way to the passenger drop-off. You have big baggages? Be ready for a nice workout and work on your arms!

As a french citizen and having lived in this country for more than 27 years, I am ashamed of this airport. It does not make justice to this country and its capital, which deserve better than that. This airport reproduces everything you can hate about france.

I regularly took this airport since 2008. I tried to provide feedback, I thought that it might help the airport to improve itself. This airport is also rated as one of the worst in Europe (see here on CNN or here on offeurope or here ). So, with this in mind and also with regularly feedback from its users (I hope I was not the same to send feedback), I was hoping progress would have happened over the last years. But after 8 more years, all what I see is just an airport that is a real mess, where passengers get lost, transiting from two gates within the same terminal can take more than 30 minutes and does not even provide basic services such an airport deserves. This is what you want to show to the visitors of the most visited capital in the world? Probably not.

For example, let’s see at some of the reasons the airport is so bad:

  • accessibility between terminals: terminals are a mess and for some terminals, you need to take a bus to move within the terminal. But not for all terminals! It can take up to 30 to 45 minutes to navigate within the same terminal. So, if you have to switch terminals, at least one hour is a reasonable bet
  • accessibility within the airport: stairs and lift are very very narrow and disabled people might have a hard time moving. Like everything in france, everything is narrow and small (french have this tendency to associate “petit” with all the words). Unfortunately, tourists coming for 2 weeks have big baggages. So, using the stairs is just a mess and most of the times, this is just a pain to carry your baggage. Also, when you arrive at some terminal, you have to use stairs and there are only small lift if you have heavy baggage or if you are disabled. Welcome in france, the country where we welcome everybody, especially the people in good health and will not stay too long!
  • accessibility of restrooms: there are very limited, their maintenance is terrible so that you might not even use them. Most of them no longer have soap and dryer are not working. I understand no why my US friends think french people do not clean themselves
  • lack of information of baggage claims: when you exit your flights, signs for baggage claims and information about where to find your baggage are hidden and not available. On my last flight, I found my baggage on a random ramp. Sure, there was a screen to give information but there was nothing on the screen itself. Ah, the pleasure to find your own baggage at 9pm!
  • lack of information at border controls: recently, during a connection, I got stuck in a corridor because of ID control. While I understand the airport has no control on the requirements of french authorities, it could at least provide accurate information to passengers. Instead of waiting 30 minutes while connecting flights in a corridor without giving any information, I would expect to wait in a big hall/room where the ID control takes places (what you have in most US airport) and where people can seat, go to the restroom or have access to water (if there was any water fountain). But as the room dedicated to ID check is as big as the stairs (remember, in france, everything is small), there is no space and so, people wait in line in a corridor and just wondering what is going on. This is probably a way to show to our tourists how dedicated we are to them.
  • wireless: the wireless requires to authenticate, give your name, e-mail, nationality, etc so that they can trace you and send you obnoxious ads. Fine. But you have to authenticate every time you move and your device connects to a new access point. So, you land: you have to authenticate. You try to access again when moving: you have to authenticate again every minute. You arrive at your gate: authenticate again. I think this is a way to promote the Minitel, a french thing that was supposed to beat the internet. Seriously, this shows the incompetence of the airport to provide a reasonably sized and user-friendly wireless network.
  • availability of water fountains: most airports now provide water fountains. This is important for an economic and ecological perspectives: why do you want to buy plastic bottles if you carry your own? And why paying for water, this is not a common good, especially when the Mayor of Paris previously declared the tap water was as good as bottled water? While there are plenty of water fountains in other airports (probably one next to every restroom in the USA), I found one or two in the whole airport. No kidding. I tried to reach out on twitter about this issue, the airport staff told me they can give me a map of the water fountains. So, just to make sure: every tourist that want water would need to contact the airport to find a water fountain! Please do not be too thirsty and take enough time: if you have to go to another gate, it might take more than 30 minutes to fill your bottle and so, more than one hour to come back to your gate. France is definitively a leader in the green economy!
Taking the terminal E2? This is the bus map with all the drops. Ask an attendant at the airport, some are not aware there is a bus!

These are just some issues I recurrently experienced as a user of the airport. I am ashamed to know that tourists arrive to this country by such a airport. It should be a convenient, pleasant and useful place that welcomes and helps you when you arrive. It should be easy to use and navigate and go to the city (and I did not even talk about transportation to the city which is also a real shame). Not the actual mess we see every day and that people actually hates.

I do not understand why the company that manages the airport made this mess. The airport is not too old and I do not understand why there are so many accessibility issues (people using the terminal 2F can probably testify about the restroom accessibility). This is the hub of the most visited capital, so, having a good airport is a strategic investment. Other European cities develop very nice airports (particularly Amsterdam with Schiphol, very convenient), which proves making a big HUB with a lot of tourist transits is possible.

What astonished me is that the evolution of this airport sounds exactly as the evolution of this country. We changed the appearance, it looks nice from the outside (there are a lot of fancy shop in the airport, you can buy all the bullshit stuff that makes france famous) but they did not invest in the fundamentals: moving, getting around, services, connecting and having information. This is also the general feeling I have when I see this country: a strong focus on trying to work on the unnecessary cosmetics details whereas the fundamentals are still being neglected. Beyond these issues is the denial of the people: when you tell people that the airport have issues, they reply to you that there are no issue and that you are doing things wrong. They are telling you that the airport is not the problem and that you are the problem. Unfortunately and currently, facts and numbers showed the reality: the airport is considered as one of the worst in the world and it seems that france is definitively a sinking ship people are trying to escape.


Paris Charles de Gaulle Airport: a metaphor of the evolution of France