Peter's Blog

Just commenting on things that interest me

Category: Technology (page 1 of 2)

COVID-19 Sketch

Wanting to do something challenging and interesting on my IoT DevKit, I decided to do something with a COVID-19 theme (we have so little else to think about these days!).

My idea was simple: to get some statistics from the web and to display them on the built-in screen.

The first step was to choose a suitable API. I chose the “Novel COVID API“.

This API returns data in JSON format. So I need to choose a suitable library for parsing the data. I choose the ArduinoJSON library.

The next step was to decide how to present the data. The device only has a 4 line display with 16 characters per line. So I ended up creating a series of screens to show the data for each country, trying to group the data logically. Because the first line is a different colour, it was fairly obvious that I should reserve that for the country name.

The last step was to decide how to control the display. The device just has two buttons: A is on the left and B is on the right. I decided on the following:

  • You would press button A to move from one country to the next one
  • You would press button B to move from one screen to the next one
  • You would press the two buttons at the same time to go back to the API to get fresh data

To be honest, I am quite pleased with the way the sketch turned out. You can see a video of it in action below. In the video you can see me viewing data for Ireland, USA, UK and the world.

The data which is shown is correct for today: 17th May 2020.

You can access the code here.

MXChip IoT DevKit (AZ3166)

In late 2018 I attended an IoT training session in Microsoft here in Dublin. They gave us all a “DevKit” which can be used to experiment with IoT in conjunction with Microsoft Azure. The device was jointly developed by MXCHIP and Microsoft.

The device is like an Arduino except that it is packed with sensors and also has:

  • A small (4×16) OLED screen
  • A headphone socket
  • An Infrared emitter
  • Built-in Wi-Fi.

Here’s a diagram showing the various components:

And here is a picture of my device:

Because this device has so much built-in capability, I always intended to develop something for it.

And in my next post I will describe my first project.

Arduino Uno

I got my first computer in the 1970s (an Apple ][) and my second in the 1980s (an Atari 800).

I always had an interest in getting my computer to interface with hardware devices but I never really did anything about it.

In 2011 I came across the Arduino platform and I finally had a chance to use a device which straddled the gap between software and hardware. I bought a book called “Arduino Cookbook” and I learned all about “sketches” (software) and “shields” (hardware).

Later that year I bought the “ARDX arduino experimentation kit“.

To be honest, I spent a lot more time reading the book than I did playing with the kit!

In July 2012 I did bring both on a holiday to Kenmare and I managed to create a fairly interesting light display with 8 LEDs.

Included below is a video from that time showing how it worked.

I planned to add a potentiometer to be able to control the speed of the sequences but I don’t think I ever got that working.

The Perfect Watch

I mentioned in my old blog that I have a Casio Wave Ceptor watch and that I love it.

I love the way it always has the right time.

The only reservation I had about my old watch was that it only had room for a four character digital display.

So you could not see hours, minutes and seconds at the same time (what’s the point of a watch which is accurate to a traction of a second all the time if you cannot see the seconds!)

Similarly you could not see the date and time at the same time.

So for Christmas I got the perfect watch. It is digital and it shows all of the above at the same time (plus am/pm and the day of the week!)

The watch is a Casio Wave Ceptor G-Shock. The specific model number is GW-M5610.

For me it had to be a Wave Ceptor so that it would always have the right time.

Originally G-Shock watches were designed to achieve “Triple 10” :10-meter free-fall endurance, 10-bar water resistance and a 10-year battery life.

My watch is actually water resistant to 20 bar, and (because it has solar power) the battery should last much longer than 10 years.

Casio now talk about 7 elements: electric shock resistance, gravity resistance, low temperature resistance, vibration resistance, water resistance, shock resistance and toughness.

So as well as being robust, waterproof, radio-controlled, and solar powered, my watch also has a backlight and (because it can detect its orientation and the lighting conditions) the backlight comes on automatically in low light when you tilt the watch to look at it!

The watch is genius! So I now have a Casio that’s dressy, and another one that’s incredibly functional. Here’s a photo:

 

 

 

Deconstructing a 6502

I have mentioned previously some people who have done unbelievable things in computing, often in their spare time.

But these four guys did something else that is completely unbelievable: Barry Silverman, Brian Silverman, Ed Spittles, and Greg James wrote an emulator for a 6502 which does not depend on a manual of opcodes. They actually dismantled a 6502 to find out exactly how it was constructed.

Then they wrote a visual emulator which reproduces the work which the basic components (3500+ transistors) are doing.

This emulator does not emulate what the 6502 is supposed to be doing. It emulates what the 6502 is actually doing!

It’s an amazing achievement. The emulator can correctly emulate undocumented opcodes because it is doing what the basic components would be doing!

Now that they have conquered the 6502 they have started looking at other chips.

You can access their website here.

And here is a video where Michael Steil give a very good explanation of what the team did and how they did it:

Building a Computer

I mentioned in a previous post that Ben Eater has a brilliant series of videos on building a computer from scratch.

He had a new series which is very good on building a computer using a 6502 microprocessor.

This is the microprocessor that I know best as it was in my Apple ][ and in my Atari 800.

Here is a link to his website where you can watch the videos (there are eight as I wrote this) and also buy the kit from him.

Here is the first video in the series:

One Small Step for a Man

On this day 50 years ago, man set foot on the moon.

It still seems incredible to me that in 1969 it was possible for three men to take off from the earth, navigate to the moon, land on the moon, take off again, and return to earth successfully!

If we had not done that 50 years ago, and we were setting out to do it today, I would still be impressed!

But I guess the thing that astonishes me most, given all of my years in computing, was the “Apollo Guidance Computer (AGC)”. This computer had 36k words of ROM and 2k words of RAM, weighed about 70 pounds(about 31kg ), was accessed using a calculator-style keyboard and display (called a “DSKY”), and “flew most of Project Apollo except briefly during lunar landings”!

That is amazing to me. The astronauts gave it instructions using a 2 digit verb and a 2 digit noun!

Apparently the power of the computer was comparable to an Apple II (which I had about 8 years later).

And apparently the “software development on the project comprised 1400 person-years of effort, with a peak workforce of 350 people”. At its peak, the Apollo program employed 400,000 people apparently!

In 2009, a DSKY (just the interface, not the whole computer) was sold in a public auction for $50,788 (about €45k)

It’s no wonder some people believe that the Apollo moon landing was faked. It’s an amazing achievement.

I was 7 when the mission took place. I remember looking at the fuzzy pictures on a TV. I’d like to say it was in black-and-white but we were on holidays at the time and I think the TV we were looking at had some kind of green filter!

Here is a link to the Wikipedia page for the AGC:

https://en.wikipedia.org/wiki/Apollo_Guidance_Computer

And here is the photo from the Apollo 11 mission with which I am most familiar (it was in the volume of encyclopedias we had at home when I was growing up!)

Hilarious Robot Video

A company called “Boston Dynamics” has built a very impressive robot called “Atlas” and has made the following video to demonstrate some of its capabilities:

Then some genius came along and added a new soundtrack to make this completely hilarious video. Funniest thing I have seen in ages. Enjoy!

Another Big Apple (Steve Jobs) Mistake

In my last post, I mentioned a small mistake made by Apple/Steve Jobs.

Here is a much bigger one, and one which has never been rectified properly.

The reason I don’t have an iPhone, and don’t ever plan to but one, is that it is too “closed”.

I have an Android phone and I can program it using “MIT App Inventor“. This simple tool (which I teach kids in CoderDojo) allows you to create apps, to transfer them to an Android phone, to debug them interactively, and to create apps which can be uploaded to the Google Store.

App Inventor is not available for iOS because Apple (and I believe this to be a Steve Job legacy) doesn’t want people developing code any way but the “right” way. And the right way involves Xcode, Objective-C or Swift, a Mac, possibly other tools, and registering as (and paying to be) an iOS Developer. And for the longest time they didn’t want you to do any kind of coding on an iPhone/iPad (this restriction has been eased more recently with things like Codea, ScratchJr, Pyonkee and “Swift Playgrounds“).

I mentioned this restriction previously in my old blog when I spoke about “Cargo-Bot“.

So until this is addressed, I’ll be sticking with Android.

Another Apple (Steve Jobs) Mistake

Here is another (very small) mistake which Jobs made: He thought a mouse should have one button (so as not to confuse users, apparently). He did not want users to have to “right click”.

So Lisa, IIGS, Mac, etc. all came out with a single button.

To me, this was just wrong.

Over time, Windows mice had two or three buttons and maybe a “wheel”. This obviously gives the user more power.

And then he endorsed the idea of a mouse with no buttons! This article claims that this came about through a misunderstanding.

I guess the problem was addressed eventuality with the multi-touch “magic mouse”. But I don’t know for sure as I have never used one.

Here is a picture of original Macintosh mice:

Mac Mouse

« Older posts

© 2024 Peter's Blog

Theme by Anders NorénUp ↑