Particle Internet Button with Photon – Web status notifier

After a fun weekend at the Hackaday Super Conference I came out with a few toys. On Sunday I took part in the Particle IoT workshop, where they were kind enough to provide us all with a Particle Internet Button and ran us through setting these up and getting them to do things.

The board is essentially an add-on for the Photon board that can be purchased stand alone. The Photon is what you’re actually programming and includes a Wi-Fi module and runs an ARM Cortex M3 microcontroller. The Internet Button adds an accelerometer, four buttons, a buzzer and 11 RGB LEDs to the mix.Particle Internet Button

It’s powered by USB, and can be setup with just their cellphone app, although I had problems due to the terrible way my internet is setup at home (I have no control over it, yay rental). I ended up using the CLI via USB. This was necessary to give the Photon the Wi-Fi details to connect to the internet.

Once it’s connected to the internet, all the programming takes place wirelessly via Particle’s online IDE. There’re a host of examples and libraries to pull from, so it’s amazingly quick to get a simple program running, pulling data from the accelerometer and making everything flash multiple colours. Particle also has some built-in integration for internet notifications and interactions, being able to control aspects from Particle’s console and elsewhere.

Left: All Green - good Right: white is checking site, red means a site failed - bad

Left: All Green – good
Right: white is checking site, red means a site failed – bad

I didn’t really know what to do with mine, so after playing around with all the examples, I set out to make a notification device to tell me whether my websites are all running or not. I have four websites I’m interested in, they’re all on the same shared hosting package, but separate domains.

This project is nothing amazing, but was fun to do, and I was able to get it working in one afternoon. Most of the time wasted was just due to being out of practice with programming.

Functionality:

  • Polls four separate websites to see if they are running.
  • Shows a green or red light to indicate if the website responded correctly or not. Shows a white/orange light while it is checking it.
  • If a website fails a check, the buzzer tones.
  • Checks all websites every 10min.
  • Can trigger earlier check by pushing button 3
  • If one or more websites have failed a check, you can shake the controller to get it to recheck just the failed websites.

At the moment I don’t get very good information from the website. I basically hosted a plain html page on a subfolder of my websites which contains a string. I then compare the string the Photon loads to what it should be. I want to look into the package a bit more to see what info I can get and differentiate between server not found and other errors.

Online log: left it running overnight. a couple failures. I blurred website address as they're projects I'm still working on. Failure is due to cheap hosting I believe, not the Particle.

Online log: left it running overnight and saw a couple failures. I blurred website address as they’re projects I’m still working on. Failure is due to cheap hosting I believe, not the Particle.

The code isn’t very pretty, I’ve got silly little delays all over the place ’cause it’s working and I’m lazy and a lot of the stuff was imported and copied in. I may update it someday, but you can view it here. I made use of the Internet Button library as well as the HttpClient library (self confessed requiring work, but I can’t complain).

Ballona Creek Bike Path

While some may say calling it the Ballona Creek Bike Path gives it a far more romanticised name than a concrete river deserves, as you get to the sea some natural vegetation and wildlife does appear. And regardless, the beauty I see in the bike path is not in the visuals, but the ability for me to escape the hustle and bustle of the LA roads and ride without being impeded by traffic lights.

After a successful ride along the Marvin Braude Bike Path, next on my list was Ballona Creek. Starting in the heart of Culver City, the bike path takes you 6 miles all the way to the sea, just south of Marina Del Rey where it meets up with the Marvin Braude.

I continued my cycle north to Santa Monica, before cutting back through traffic to University Park.

Once again I strapped on my GoPro and went for a ride, you can see the compilation below:

More info on the route can be found here.

 

Bridge to Nowhere

A few weeks ago we got the opportunity to do some hiking in the nearby San Gabriel Mountains. A group of about 8 of us hiked up there for 3 days passing by the Bridge to Nowhere.

img_4417It was our first opportunity hiking in the area and we were fortunate enough to have great weather. We drove up to the trail-head on Saturday morning, arriving around 9AM. The parking lot was packed. We had to park several hundred metres down the road and hike up. Parking requires a pass, and free permits were available a little way on by the camping area.img_4454Although the parking lot was full, the trail is long and wide enough that you rarely have any problems with other people on the track. Majority of the people we saw were situated at the Bridge to Nowhere itself, watching or taking part in the Bungee Jumping. We had no idea about this when we were hiking in, and none of our hiking mates mentioned it to us until we got there, assuming everyone knew about it :) Coming from SA it’s not the biggest bungee jump in the world, but more than enough to get a thrill, especially with the really close cliff faces. None of us tried it though.img_4504The hike itself is not too strenuous, a 10 mile round loop to the bridge and back, made up of meandering paths and some river crossings. When we hiked the area was extremely dry, so I managed to keep my shoes out of the water the whole time, but there is usually more water, requiring some wading. Although there are a few areas with a slight climb, over all the route is flat with only about 200m of altitude gain.img_4499We arrived at the bridge and had lunch there, but our plan was to continue past the bridge. We carried on and set up camp on the side of the river a few hours later. Once you get past the bridge you are walking in a canyon the whole time, criss-crossing the river. It’s really beautiful and was great to get out of the city.img_4474We saw a snake. It was super chilled, just doing it’s thing. Also many people panning for gold. Apparently there’s still some left, but the further upstream we got the less people we saw, but the more remnants of previous mining activities showed up.img_4477Also poison oak. Something we haven’t seen before, and we were fortunate enough not to have any bad experiences with.

The Overseas Market

Note: this post was originally hosted at the retired autosandelectric.co.za, an archive of which can be viewed here. Original image links to Twitter are no longer available.

We recently had the opportunity to attend the OC International Auto Show in Los Angeles, and what an eye-opener. Smog used to be a major issue in LA, but thanks to a number of efforts and legislation, a major turn around has been seen. Part of this relates to car regulations surrounding emissions. Along with this came a major push towards EVs support by a Clean Vehicle Rebate Program.

As such you see a lot of EVs driving around LA, a lot more than in South African in any case. And the OC Auto Show showed similar trends with majority of manufacturers featuring at least one hybrid or alternative energy vehicle.

There are several reasons for the very limited availability of EVs in South Africa, one of which which is often overlooked is price. At $30,000 the Nissan Leaf is one of the entry level vehicles in not just the EV market, but the hybrid market as well. This translates to about R400,000 and is sold locally for about R450,000.

That is a lot of money for a car, but you can see the Dollar-Rand exchange doesn’t affect it that much. Where are the R200,000 EVs. Although $30,000 is still a lot for a vehicle in the States, with a minimum wage in California eight times higher than in SA, and an overall higher income group, more people are able to afford such vehicles.

This then has the rollover effect that because there are vehicles, more charging stations are built, because more charging stations are built, more people feel like it is not a hassle to purchase an EV.

It was refreshing walking around the Anaheim Convention Centre and viewing all the EVs and hybrids on offer, that we just don’t get in SA. Some of which include:

  • Audi A3 e-tron
  • Ford C-max Hybrid
  • Honda Clarity – Fuel Cell
  • VW e-Golf
  • Toyota Rav Hybrid
  • Toyota Mirai – Fuel Cell
  • Hyundai Ioniq
  • Hyundai Tucson – Fuel Cell

Surprisingly absent were Tesla, although they don’t really do things in a conventional manner. Although Mercedes had a large offering of their vehicles, their hybrids were completely absent.