More Particle Internet Button Projects

I posted a few months ago about the Particle Internet Button I’m playing with (link). I’ve created another 2 projects in the mean time.

Adjustable Timer

The first is an adjustable timer. The lights on the Internet Button are used to indicate 30s steps, ranging from 30s to 5min. When it turns on you specify the length of time you want to run it for by either increasing or decreasing the steps. When running the 30s that are currently active flashes. At the end of the time, the Internet Button beeps and flashes red. It can be easily adjusted and reset.

particle timer

Left: select length of time
Right: Timer running

I made this back in November, but actually had a problem with it that I couldn’t figure out. I had intended to post to the Particle forums for help but never got round to it. I had in the mean time uploaded the offending code to Github. I recently reinvestigated the code with the intention of this post, and found that someone else had found my code, and solved my problem, so thanks to Github user mseneshen. Working code can be found here: source

Dice

The second project was a set of dice. Playing Catan and having people complain about how there were no 3s rolled in a game gets old, so why not create a set of dice that keep track of this and tell you facts. Apps are available for this, but then the screen turns off and it becomes a hassle. So I wrote some code to mimic a set of dice.

particle dice

Left: Dice being rolled
Right: Dice have been rolled

To roll the dice you gently shake the Internet Button sideways. The code randomly generates two numbers between 1 and 6, adds them, and outputs them by lighting up the appropriate number of LEDs. To make it easier to read, LEDs are colour coded in groups of 3. The Internet Button only has 11 LEDs, so I if a 12 is rolled, the 11th LED changes colour. Because a 1 is never rolled, I could have used that LED, but it seemed less intuitive. Also, because we play Catan, if a 7 is rolled, all the lights go red.

The whole time the dice are running, a tally is kept of how many times each number is rolled. At any time you can click a button and a distribution is published to the console. I might update this later to automatically graph the data and tweet it, but haven’t tried that yet.

When I first tested the code, I was getting reproducible random numbers, so I introduced a seed from one of the analogue pins which appears to have solved that problem. Because it uses an accelerometer to trigger a throw, when it is on it’s side, gravity is enough to trigger a throw and allows me to get thousands of throws without destroying my wrists.

Some plotted results can be seen here, with actual roll percentage (bars) vs statistical roll percentage (dots).

Code is available here: source

Temperature and Altitude

I recently bought an Adafruit BMP180 that I’m trying to get running with the Internet Button. Will post details once it’s active.

New SA Traffic Laws 2017

Recently in the news there has been some talk about new intended traffic laws. According to this article they are supposed to come into effect on 11 May 2017.  The laws are:

  • Bakkie drivers may not transport children in the back.
  • Bakkie drivers may not transport more than 5 people in the back
  • Heavy goods vehicles will be speed limited by weight, and require a sticker indicating the speed

This is going to happen. It has been published in the government gazette. Further laws that they wish to implement at a later stage, but have no due date, include:

  • Practical driving re-evaluation when renewing licence
  • Re-examine K53 (update it)
  • Lowering of speed limits in certain areas.
  • Goods vehicles with GVM > 9 tons banned during peak hours.

These laws were first discussed in 2015, but similar to the laws the DoT tried to pass in 2011, have been very poorly communicated to the public, and with any luck will be reconsidered. Both the laws that are changing and the proposed ones were published in the Government Gazette of 11 May 2015. And the Justice Project South Africa submitted some excellent commentary. To what it seems was mainly deaf ears.

I wanted to find more information about these topics, so tried looking around a bit. I first went to the eNATIS website, but their news page was returning a 404 error. The Department of Transport website didn’t go to their homepage (first google result), but asked me for login details. After getting to their proper home page, I couldn’t find any info on any upcoming changes to the NRTA. I then looked through Arrive Alive’s website and couldn’t find any news, and my browser warned me that the AA’s website was untrustworthy.

Let’s look at what’s been published though. On 11 November 2016, the 24th amendment to the NRTR was published in the Government Gazette, it had some definition changes, but ultimately the important parts were that as of 6 months after the Gazette was published, the following will come into effect. paraphrased:

school children may not be conveyed in the goods compartment of a motor vehicle for reward on public roads.

No one may be conveyed in the goods compartment of a motor vehicle for reward unless complying with NTLA provisions.

The amendment also immediately specified the inclusion of the following vehicles into the category not allowed to travel more than 100kmph, paraphrased:

vehicles between 3.5 and 9 tons

So what does all this mean? Basically what I put in the first half of this article. It means the law has and is changing. It means that there quite likely will be more changes later on, but there’s no new information.

The DoT really needs to reconsider the laws it’s implementing and take into count the excellent comments they receive back from the public, specifically organisations such as the Justice Project. They also need to do a better job of publicizing changing laws, and not rely on news outlets to publish these details. Very few people read the government gazette, and even fewer can make sense of what gets published.

Angeles Snow

Apparently it snowed in LA in the early 1900s. I’m not so sure about that, but that’s what I’m told. However it definitely doesn’t snow in LA now. We have been blessed with a large amount of rain though in the last month, and LA has several 3,000m+ peaks surrounding it. This means that it does snow in the mountains around LA, and many people have completed the challenge of spending some time at the nearby ski slopes in the morning, and heading back to LA for a swim in the afternoon (it was 25degC last week, mid-winter).Angeles ForestSo last weekend we took a shortish drive out into the mountains to go play in some snow. The nearby Angeles National Forest has a highway going straight through it, so we packed in our snow chains and hiking boots and headed out. Within an hour we had snow around us, and shortly further down the road, a snow plough blocked our path. Apparently it’s too much work to plough whole highway.

We pulled off nearby in any case and climbed up a nearby hill through 3 feet of snow and played around a bit. A week later we decide to head out again and try find the Cooper Falls, also in the Angeles National Forest. A week later, even without any further storms, the snow was still holding out, and our entire hike took place on top of snow.Buckhart TrailThis was a lot of fun. While the city was covered in cloud, as we drove out of town we came out above the snow. We took the Buckhart Trail to Cooper Canyon Falls, and after a bit of wondering we realized the start was from the camp site and not the day site. The campsite is closed during winter, as is the road leading to it, so it adds another mile each way to get to the actual start and end of the hike.Buckhart TrailAll in all we did about 6.5 miles with 3,000ft of elevation, with our highest point around 6,300ft. The route is basically invisible with snow on it. The only way we were able to do this hike is because others had trodden the path before us. There are occasional signs, but if you haven’t done it before, and don’t have a GPS route to follow, definitely don’t do this after a fresh snow. You can see my tracking here.The route was pretty moderate. Some sections were a little scary, having to kick your shoes into the snow for grip on fairly steep hills. Not for someone who’s scared of heights. If you had snow shoes, those would definitely have helped. We saw about 4 other people on the route. But for the most of the time, our group of three was alone.We had a lot of fun exploring the Angeles forest a bit. now that we have a car and know about how many routes the forest holds, we’ll definitely be back for some more, maybe in the summer.

Cooper Canyon Falls

A permit is required to park anywhere in the park. Day permits were available at the Clear Creek Info Centre on the way in for $5 (cash only), but NPS permits are also valid.

Mistake (?) on the Simplon Pass

In August my wife and I spent a couple days on the Simplon Pass in southern Switzerland (more on that here). We walked around quite a bit (long days in summer are great), and one day happened upon these stone slabs with inscriptions.There were three groups of them, scattered on the hills, each with three slabs. At each group, there was a phrase in English, a phrase in Italian, and a phrase in German, and by going to the different groups, we found there were three different phrases translated into the different languages.

The three phrases were:

feel the earth – senti la terra – fuehle die Erde
listen to the sky – ascolta il cielo – hoere auf den Himmel
observe the heart – osserva il cuore – beobachte das Herz

 

earth – heart – heart

What I found funny, was that, if I had planned it, I would have chosen one of two arrangements.

earth – sky – earth

Either you have one phrase at each grouping (in all three languages). Or you have one language at each grouping (with the three different phrases). A third possibility (although not one I’d choose) is to at least have all the phrases at each grouping, but in different languages.

sky – sky – heart

We’re not sure what the original plans called for in this project, but the result was none of these three. Instead each grouping has two phrases, one in one language, and then another in the other two languages.

We’ll ignore the comic-sans and rather humorous typo of “Fell the Earth”.

Besides my nitpicking, the project fits beautifully into the surroundings, and I hope it is a permanent feature. There’s something surreal about the Swiss countryside, in between the mountains, the snow and dark green fields.

The project was titled “A step between human being and nature” by Emanuela Baldi & Filippo Fabbrica, 2012.
The project was ties to Love Difference and Michelangelo Pistoletto