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).

HP Envy 24 Review (with beats)

Having recently relocated, and sold all my worldly possessions, I was once again in the market for a second monitor. Back home I had been working with a Samsung 2333 which had served me faithfully for about 7 years. I amazingly paid about R1500 for it brand new, and since then I have been concerned by the ever increasing costs of LCD monitors.

One thing I’ve enjoyed about the US, is the large refurbishment market. It allows one, with minimal risk, to purchase 2nd hand products that have been through some form of quality and performance check. Generally receiving at least some form of warranty. And thus I ended up purchasing an HP Envy 24 with beats audio.

hpenvy24My only real requirement for the product was that it was at least 23″, full HD (1080p) and had either an HDMI or DVI input. I did a variety of Amazon and E-Bay searches before settling on this product. Originally finding it on E-Bay, I actually purchased it through the retailer’s own website: Refurb4Less.

I paid R1300 for this product, which new retails for well over $200. My only concern when purchasing this was that it had a stated quality of B-, indicating “Minor scratches on the frame, base and screen”. At the price though I was willing to accept this.

LHS with volume | RHS with power button and light up touch buttons

LHS with volume | RHS with power button and light up touch buttons

It arrived quickly, in less than 3 days, and I opened it with trepidation. However after putting the base together, and going over the screen several times, I can’t find any of the reasons it received a B- rating. And I’ve stopped looking, as this way I’m happier with my product :)

The screen includes beats audio speakers along the bottom, and provide marginally better sound than my laptop’s admittedly impressive sound. The screen came with a separate power supply, HDMI, VGA and 3.5mm audio cable.

pixcels

pixcels

The screen looks really nice, it’s clean and neat. It doesn’t rotate or lift, but does tilt, which is adequate for my needs. Picture quality is excellent. It boasts an IPS screen with amazing viewing angles, and my only complaints would be because we’re stretching a 1080p resolution across such a large screen. This is not HP’s fault, just the current market.

Plugs - RefurbishedSetup was easy, I plugged it straight into my laptop’s HDMI port, and sound and picture worked straight away. The screen has a form of touch buttons which I’m not a big fan of, but fortunately one only needs to use them once to set up. It has a power button just below the light, as well as a volume scroller on the other side of the screen which is a nice addition.

My only annoyance, is I’ll often leave my laptop playing music in the background and go do something else in the same room. However after 15min the screen goes to sleep, and with it power to the speakers. I know I can prevent this from happening, but then I’ll have to get into a habit of turning the screen off when I actually want to. So for now it just requires a regular mouse shake to keep things running smoothly.

so thin

so thin

The screen is way thinner than I was expecting, and the bezel is also super narrow (especially compared to my old LCD) and I’m really impressed with what I got. Would recommend.

It even has a headphone jack on the LHS of the screen.

I don’t like Verizon

Goodness, I’m not sure exactly where to start. My cellphone screen on my Galaxy S4 got damaged in July to an extent that it was unusable. For the last month or so I’ve been using an old Galaxy Trend which while doing the job, does it in a manner that frustrates me, slow, laggy, crashes etc.

Now in the US I figured I’d be able to pick up a cheapish 2nd hand S4 and perform a motherboard transplant. Looking around Ebay, I found quite a few phones. Almost all of them were 16GB versions (as opposed to my 32GB) and many were CDMA (although including GSM). From this I thought there might be some problems with a direct motherboard switch, but if it looked like it wouldn’t work, I could just use the phone as it came and not do the transplant.

Additionally to this, most of the phones seemed to be carrier locked. A google search showed that this is relatively easy to disable however, so I thought nothing more of it. Cue me buying a Verizon Galaxy S4.

IMG_4304It arrived, I put my T-Mobile SIM card in and booted up. The phone notified me that an invalid SIM card had been put in, but still allowed me to make phone calls. Time for the heart transplant.

The phone opens up easily enough, at first glance the boards look like direct replacement, but I noted several small differences. As such I decided to rather try get the Verizon phone to work with my T-Mobile SIM.

It should be as simple as going into a ‘secret‘ menu and changing a setting. Problem one, none of the ‘secret’ codes did anything. Even typing *#06# (which should bring up the phone’s IMEI number) did nothing. Verizon had the secret menu blocked.

Then I tried a bunch of other things, firstly trying to create a shortcut to trigger the secret menu. Which failed. Then trying to send commands to the phone via USB debugging and the Android Development Kit. Eventually resigning myself to rooting my phone. Kingo works like a bomb by the way. This allows you to edit a file in the system to make hidden menus visible.

Great. All done, but not actually. So I can bring up the hidden menu, but when I navigate to the correct place, the option I need to turn the SIM Lock off isn’t there. There should be 3 options: info, on and off. I have only info. Now I don’t know what to do. There are lots of people with lots of ideas. They mention installing other APKs, I install CWM recovery to support this, but whenever I try boot in to the CWM recovery, the phone decides halfway it doesn’t like CWM and loads the standard Android recovery menu (I assume this is also Verizon’s doing).

Image modified from

Image modified from Wonderhowto

I remember now that, although the phone tells me it has an invalid SIM card, I could still make a phone call. My data doesn’t work, but looking around, I was able to create my own APN which then got my data working. SMS however wasn’t working, and the usual menu item to change the SMS Service centre wasn’t there. There is apparently another code you can enter to bring up a hidden menu. But for whatever reason this did not work. Googling I see that others have a similar issue.

Unfortunately not everyone in the US uses Whatsapp or equivalent, and I still rely on being able to send SMSs. So I decide to cut my losses(?) and go for the heart transplant.

IMG_4303It went OK. Not as well as I’d hoped but OK. Took Verizon motherboard out, and put my 32GB motherboard in. So there are a set of cables down the LHS which plug into the motherboard. The cables are fairly rigid and the plug location slightly different on the two boards. There’s an additional brown wire that was not in my 32GB phone.

Circled plug in different place results in bulge in cables

Circled plug in different place results in bulge in cables

I removed this additional wire (as no where to plug it in) and went about removing some plastic structure of the phone to get the cabling to still fit in its new position.

Clips that I shaved off to make cables fit.

Clips that I shaved off to make cables fit.

Put everything back together and it works. However the bottom ‘back’ and ‘menu’ buttons don’t function. They light up occasionally but don’t do anything. At the moment I’m just living with it to see how annoying it is. I did find a workaround. Also the phone thinks its charging even though it isn’t :/

Coming from South Africa, where phones haven’t really been carrier locked since the late 90s, the amount of effort that has gone into locking the phones in the States is incredible. I’m truly impressed (albeit extremely frustrated) at the lengths I’ve tried to go through to unlock this phone. Verizon will apparently do it for a fee, ~$100. More than what I paid for the phone in the first place.

But I have a mostly working phone. And it’s fast and I’m happy enough for now :)

Also I realise Verizon didn’t do all this work themselves, and that Samsung developed the phone in this manner. But it was done because of companies like Verizon who believe that the phone should for some reason belong to them. And that is why I don’t like Verizon.

Huawei Mediapad T1

I’ve been contemplating buying a tablet for a year or two now. But had mostly decided against it, mainly due to the lack of use it will get. I had previously owned an IPad 2 which I won in competition in 2012. I had sold it several months after winning it as I wasn’t giving it the use I felt it deserved, and as a student heading off overseas I felt the funds could be put to better use.

IMG_20160515_132647

Slots for MicroSD and MicroSIM exposed in top left (tablet’s bottom right)

And I didn’t regret it. Recently however I’ve been travelling more frequently and my future plans appear to contain a lot more travelling too. Specifically flying. I have on several occasions travelled with my laptop. Which is OK. But it’s heavy, bulky and awkward to work on when on the move when you don’t have a desk or somewhere to place it. My phone on the other hand, while being very capable, is not something I’m going to get much work done on.

So for the past few months I’ve been trawling the second hand tablet market. Which in East London is slightly worse than the already poor SA 2nd hand market. Tablets seem to hold their value remarkably well. I’d hoped for an iPad, preferably with a retina display. iPad Air would have been ideal and I was specifically looking for a device with mobile data. The prices however were (for what I was wanting) exorbitant.

3.55mm audio jack, power button and volume rocker

3.55mm audio jack, power button and volume rocker

I tried Android equivalents but they were no cheaper. Eventually resigning my fate to that of a 720p screen. Still in the market I started monitoring specials and deals from the various technology outlets. Eventually settling on a Huawei T1 Mediapad.

And it’s ticked all the boxes. Takealot had it on special and with a significant amount of eBucks I managed to pick it up fairly cheap. Takealot advertised it as a 4Gb model without SD card slot. Research however showed this did not exist, so I ran the risk and ended up with a 16Gb unit that I added a 64gb microSD card to. I ordered a black unit but they delivered a white one. Not the end of the world and I chose to not bother with the return procedure.

charging port at bottom is updside down

charging port at bottom is upside down

It came neatly packaged with earphones I haven’t bothered to use and surprisingly only a 1A charger with separate micro USB cable. Not much else needed. The first thing I noticed when turning it on was the resolution. I didn’t think it would bother me, and I’ve gotten over it with time, but 720p on a 10″ screen in this day and age is a crime. My 3 year old Galaxy S4 has 1080p on a 5″ screen. Tablet still works fine, but low pixel density is noticeable.

The tablet hasn’t give me any trouble really. I’m not a big fan of the EMUI (v3.0) interface and may run a jailbreak at a later stage but will stick it out for now. It gives transparent icons a green background and all apps are on your ‘desktops’. No apps menu. I also prefer hardware interface buttons as opposed to the on-screen ones Huawei use.

Why do icon backgrounds go green?

Why do icon backgrounds go green?

The volume rocker sits directly below the power button which means I regularly turn the screen off instead of changing the volume. Both are located top right which works well. The charger plugs in at the bottom, however goes in upside down. Unusual. Headphone jack located on the top. Right hand side bottom hides the micro SIM and microSD cards. Cameras are nothing to rave about, but I won’t use them for anything more than Skype for which they are adequate.

The 4G works well and the phone allows for voice calls and SMS as well. The tablet runs Android KitKat and besides Google Camera not working, I haven’t experienced any other major problems. At times the tablet will freeze momentarily. This is most noticeable when playing music and doing something else where the music will not play for a short time before continuing. This is noticeable in some other apps too when you push a button and it will freeze for a short time. Although slightly annoying it doesn’t majorly impede the use of the tablet and I’m not sure of the exact cause.

Overall I’ve been happy with the performance of the tablet. I’m by no means a power user and am slowly finding more and more uses for the tablet. Another slight annoyance is the lack of locally available covers for the Media pad. I’ve had to resign to doing an eBay order to get one which will probably still take another month (took 6 weeks in total in the end) to arrive assuming SAPO do their job.IMG_20160515_132852

The touch screen is mostly responsive but can be a bother at times, requiring multiple taps, specifically on smaller targets, to register.

Time goes on and as it does I discover more I like and dislike about the tablet. But I won’t be selling this one any time soon.