Do It Yourself – AI Assistants

Tags

, , , ,

CyborgThe options available to consume voice activated assistants are increasing with recent releases within the market.

The availability of pre-built off the shelf Assistants is growing and so is the ability to build your own using the open sourced versions.

Google recently gave away AIY (Do It Yourself Artificial Intelligence) a maker kit, with Voice Hat and components to work with a Raspberry PI on the front of the Raspberry PI Magazine issue 57 – (MagPI) inline with the release of the https://aiyprojects.withgoogle.com/

The demand for this kit was very high and as a result unfortunately there are none left and not much information at the moment of the kit becoming available for sale. There is a waiting list available and it will probably be released depending upon demand.

This aside whilst we await the release of the sale kit for AIY, you can still take advantage of the AIY capabilities and a Raspberry Pi 3 in a similar way to installing Amazon Alexa onto the PI.

  • Google AIY Build
  • Raspberry Pi 3
  • Generic Aux Speaker
  • USB Microphone

You could go one better by running both Alexa and Google AIY on the same Raspberry PI, using a build from xtools called AssistantPi.

AssistantPi is basically a tweak of AlexaPi. It includes the Google Assistant SDK and uses AlexaPi’s hotword recognition to activate either Assistant or Alexa. The installer provides an easy way to get everything set up in just under an hour.

https://www.hackster.io/xtools/assistantpi-74b772

A great project to try out and learn from, giving you the power of both Alexa and Google.

Attending GitHub Satellite 2017

Tags

, , , , , ,

Yesterday I attended GitHub Satellite 2017 in LondonGithub

https://github.com/blog/2313-join-us-for-github-satellite-2017-may-22-23-in-london-uk

The event was well attended and there was a good buzz around the conference. GitHub Marketplace was launched at the conference and some of the initial vendors in the Marketplace demonstrated how their applications can be used in the lifecycle of coding. You could watch demos and chat to the companies at their vendor stalls to gain further information.

Below are my notes from the conference and Key Note opening speeches

Opening

The opening lead by Chris Wanstrath (Co-Founder & CEO, GitHub) and Kyle Daigle (Senior Engineering Manager, GitHub)

  • GitHub has 21 Million Developers
  • 59 Million Projects using the platform.
  • Expanding into gaming with Githib for Unity
  • Extentions for Visual Studio

ATOM

  • Help guide the approach with ATOM
  • 2.1 million active users of ATOM

Electron

  • GitHub desktop GUI new version based on electron. Open Source to allow it to be developed by community.
  • Electron platform for building desktop apps. Runs cross platforms.
  • Companies using electron to build internal apps.
  • Seeing big fortune 500 companies using electron for web, mobile and desktop apps.

GitHub as a platorm

  • Now 9 years old.
  • Today more API traffic than UI traffic
  • 5+ million users use integration
  • OAuth growing doubling each year
  • API ‘s have not been developed and remained static….. 9 years old.

World moving to a new world of API’s. Moving on from SOAP to REST to what’s next.What is the future of API’s:

GraphQL

  • Build queries on data you need.
    • Powering new features of GitHub
    • Suggested reviewers
    • Projects
    • Topics
  • 125 million GraphSQL internal queries a day.
  • GraphQL is open source.

GitHub Apps

  • Fine grain permissions
  • Choose how you want to give access to repositories
  • Using bots in Integrations

GitHub Marketplace (Launching today)

  • Find tools that meet your workflows best.
  • Pricing plans in marketplace
  • Marketplace has option to join and apply to be part of Marketplace.

Build and Grow Sessions

There were a number of sessions held in either the Build or Grow track which attendees could join.

I went to sessions in both tracks including the session on Building Interconnected Workflows which featured companies in the newly launched Market Place. Heard from these companies on how their products could be used in conjunction for a full code project lifecycle, which was interesting and good to hear.

Vitor Monteiro, GitHub
Andrew Homeyer, Waffle.io
Danielle Tomlinson, CircleCI
Jaime Jorge, Codacy
Cory Virok, Rollbar

There was a good session on Women in IT from Amy Dickens from the University of Nottingham which also covered topics of diversity and how workplaces and attitudes can change to make a difference.

Closing Session

The closing session was run by Marc Scott from the Raspberry PI Foundation who gave an overview of the Foundation, what it does and how the community can help review projects and sumbit projects for others to practice, learn from and enjoy. Also helping by joining local coding groups to pass on knowledge.

Sessions were streamed and Im hoping that replays are availble to catch up with the sessions I couldnt get to.

Unfortunately I could not get to todays workshop sessions but again hoping for streams of these following the event.

Automating leaving a geolocation area

Tags

, ,

mapFollowing on from my blog about Accepting automation and safeguards, in this post I will demonstrate how easy it is to set up a recipe from IFTTT (If This Then That) to use the location service to send a text to someone when I have left a Geolocation zone.

There are other automation tools you can use on your mobile such as Tasker, Zapier and Automate, however for this example I have chose IFTTT.

The actual configuration of this task is very easy using either the web or mobile tool.

Using the tool in this example, I chose the recipe ingredients that related to my mobile. In this case an Android phone.

The interface takes you through an the process by clicking the relevant icons and entering some simple information. I have flow charted the process below:

IFTTT

You can install the application on your mobile and sign in so that it knows about the tool. Its also important that when using location recipes that you also turn on the Location/GPS function on your device.

This set up uses Android, IFTTT, Google maps and the GPS function of the mobile. These should be kept up to date with any updates that come out on a regular basis.

The text message itself can contain a number of parameters “I exited an area {{OccurredAt}} via Android {{LocationMapUrl}}”  which did put some context into the text message.

{{OccurredAt}} provided a date and time

{{LocationMapUrl}} provided a location in google maps

You can remove these from the message if they are not needed.

There are lots of sample recipes and ones created by others that you can reuse, or the site has the ability to create your own.

(originally posted at https://maxhemingway.com/2016/02/19/ifttt-sms-when-exiting-a-location-recipe/)

 

10 Books I’d send to my younger self

Tags

clock-407101_1920In H.G. Wells “The Time Machine”, the Time Traveler comes back from the future to take 3 books from a bookshelf in their study to return to the future. The reader (or viewer of the film) is left guessing which 3 books have been taken from the bookshelf and how they will shape the future.

Thinking about this the other way, I have been considering which books I would send back to my younger self to read to help my career earlier than when I actually read them. I have expanded my choices to 10 books rather than just 3.

As in “The Time Machine”, I’ve chosen books that are on my bookshelf that I would pick up and hand back to myself. Some of these may be considered a bit dated, however I have chosen books here that helped shape my thinking through the years, rather than the Sports Almanac (Back to the Future reference).

Time paradoxes aside – here is my list;

If you had an opportunity to send 10 books back to your younger self, what would you choose from your bookshelf?

Top 10 Books

 

Accepting automation – Do we need safeguards?

Tags

, , , ,

CogsThere are many and apps available to help us automate basic tasks on our mobiles and computing devices. When choosing these tools, we often read reviews and then download the app, run and set up, then let it run its tasks accepting that it will carry out our requirements. But what happens when there is an issue.

I have a simple IFTTT (If This Then That) recipe running on my mobile phone that sends a test message when I leave an area set up in google maps using Geolocation and GPS to look at my location. A standard recipe for IFTTT.

Today whilst sitting at my desk the recipe triggered saying I had left the area, however I am sat in the middle of my geolocation fence which extends for about 1 mile around to allow some local area travel. The net result is the person who got the message thought I was on my way home, when in fact I was still at work.

Solution to my problem:

The issue with this recipe was caused by the Android operating system and the phone type causing some wonkiness with the location. I fixed this by ensuring all the packages are up to date, rebooting and using another app called GPS Status to assist with ensuring my GPS is working correctly and has the right the location. Also ensuring that the GPS is set to high dependency. The downside may be the drain on the battery with the extra services – I will monitor this going forward.

The main thing this points out is how we accept and then use an app/tool and expect it to work, but not consider the what ifs, such as what if the app triggers incorrectly. Should I have set any safeguards in the recipe or built a counter app.

No harm done in this case as it triggered a text message, but what if this had done something different such as put the heating on, turned on a kettle, opened the garage door, turned something else off? This could be reversed using another recipe to turn things off if I’m within the geolocation fence.

So, what can you do to ensure that your apps/tools and related apps/tools are reliable:

Research – review and research your app. Have there been any issues with running something similar.

Secure – Think about the security of the app and what you can do to protect yourself.

Update, Update, Update – keep the OS, Apps and related apps up to date. In this instance, Android, IFTTT, Google Maps.

Plan – for the what ifs. Allow a reverse control if needed such as turn off the kettle, close the garage, turn on the alarm.

Experiment – Dont be afraid to experiment to get the automation you require.

Safeguards – Think about any Safeguards you may need to build in such as a counter app.

Another step towards personal AI’s

MachineThere have been many different attempts to create a J.A.R.V.I.S type of AI system to act as a personal assistant, able to interact with you and automate things.  (If your not sure what J.A.R.V.I.S is then you need to look up on Marvels Iron Man and his AI Assistant).

These have been from high profile people like Mark Zuckerberg (Facebook) creating a version on J.A.R.V.I.S in his home, voiced by Morgan Freeman. This system has linked simple things like lights, music and toasters which all have IoT devices that you can link together, to more elaborate items such as a t-shirt dispenser, motors to open the curtains and face recognition door system. The brains behind is based on a chat bot and mobile app that the user can integrate with. Details in Mark’s blog post: Building Jarvis

Video: Mark Zuckerberg’s AI – Personal Assistant – Jarvis – Home Automation

Other J.A.R.V.I.S examples and developments  range from simple lights and desktop interactions, to Amazon Alexa being used to control interactions with apps called J.A.R.V.I.S.

If you are looking to build an open source version there is JASPER using a Raspberry PI and other components.  You could always build a version of Alexa on a Raspberry PI

The explosion of IoT and Voice controls is driving innovation and making it easier to start building your own version of J.A.R.V.I.S. There have been several recent announcements from Amazon that help with this:

Amazon have announced the Amazon Echo Look which is a device that can take a photo of you through an Amazon Alexa providing voice commands for the look and then displaying on your app. Another addition is Style Check which can compare your photos and using machine learning check against the latest fashion advise.

Another announcement from Amazon is LEX, which is the program behind aLEXa (Alexa) which has been opened up for developers to start creating conversational chat bots using voice and text.

For those thinking about an actual Iron Man Suit – Richard Browning is certainly a step closer to that vision – Richard Browning and his Real-Life Iron Man Jet Pack Suit

“Adding J.A.R.V.I.S Project to To-Do List.”

 

 

 

Voice Assistants and The Letterbox Problem

Tags

, , ,

microphone-338481_960_720There are lots of voice activated tools and services now available from software on your PC and in your car to physical hardware you can place around your home. These devices are becoming everyday occurrences, “Alexa, whats the weather”, “Siri, recipe for  Chocolate Cake” (too many to list).

The two main ways to control them is via a button press then speaking such as my car to get it into a listening state, or they are always in a listening state awaiting a set of specific interaction commands, such as the applications name. There is at least a turn of listening mode.

However with all these devices and software, there is a distinct lack of security around voice recognition and lack of interaction security. For instance a recent incident where a TV show caused a number of Dolls Houses to be purchased.

We are busy connecting these devices to all sorts of home automation to make it easier to do things, but how many stop to think of what I term as: “The Letterbox Problem”. This is where you have automated your home to a level that includes things like your lights, powered items and your house alarm. As you walk into your house you can say voice commands to turn on lights, put the kettle on and turn off the alarm. The Letterbox Problem happens when someone has the ability to literally shout through your letterbox and activate or deactivate items in your house. To a would be thief, turning lights on and off will check to see if anyone is at home first before going for the alarm.

There is a security challenge here is to ensure that a level of voice recognition and security controls are in place. Voice recognition by itself is not good enough as I’m sure you’ve heard an impressionist mimic a celebrity on a TV or Radio show.

I would like to see a form of two factor authentication on a voice system so it can be sure its me before it carries out the task. Voice may be one of these, but something else like a token code or app on the phone may be a solution.

There a number of basic steps you can take at the moment to help protect yourself such as:

  • Think about the systems you are connecting the voice device to. Can it compromise your security if anyone else uses it.
  • Use the mute button on devices or turn of listening mode when not in use.
  • Keep the devices updated with the latest patches and firmware.
  • Use good password security practices on any sensitive systems you use (ie Bank Accounts, Paypal etc).
  • Use strong passwords on any associated accounts to the voice assistants, (ie Amazon, Google, Apple etc).
  • If your system allows it, clear out its cache and old activities on regular basis so they can’t be replayed against you.
  • Don’t have a system listening when the TV or Radio is on, especially when your out of the room. You may end up with a new dolls house.

 

Taking your coding to the next level – Scratch to Python

Tags

,

code2Following on from my last blog post “How you can begin to Code“, by now you should have been getting to grips with a good level of basic coding using games to help you learn to code.

So where do you go from here? Most of the initial links I listed used a scratch type of game to help you learn, but how can you transition over to another language such as Python.

At a STEM event I met up with the author of a programme called “edublocks” and got chatting to their team. I was impressed by this application and its capabilities that allow you to move from Scratch to Python easily using a block method similar to scratch.  This helps with the Python Syntax by presenting it as a set of drag and drop blocks.

edublocks can be found at edublocks.org and allaboutcode.co.uk

This makes the transition from Scratch to Python easier to understand and opens up the opportunity to start coding in Python quicker than using the standard Python language. This is achieved by dragging blocks from the Toolbar to the workspace to create the code. You can look at the code behind the blocks to see what the real Python code is and then run the code to see the project you have created.

You can follow the latest developments on the edublocks/allaboutcode twitter feeds:

If you want to continue to learn using the gaming method then CodeCombat will present you with a next set of challenges, coding you way through various levels of dungeons using Python, JavaScript, CoffeeScript or Lua (Game Scripting Language). Choosing a hero and coding them through various scenarios and engaging with several monsters on the way.

Learning to code doesn’t have to be entirely game based. You can work through various online courses and videos that also have the benefit of forums an tutor help. Coursera run several courses from basic Python to using Python for Data Science:

https://www.coursera.org/courses?languages=en&query=python

The main thing to remember is that your not alone in trying to learn a language. There are lots of great places for help and reference available. If your stuck then there is always your favorite search engine. Entering in an error code or syntax question, should point you to an answer through the online manuals, or someone having that issue or requirement before.

One good source of information to book mark is “Stack Overflow” which is a site where programmers ask questions and help each other out. It contains a great search engine, so always remember to search a question before you ask one.

Keep practicing and coding. Set yourself simple challenges to code and then move to more complex challenges. The more you code, the more you learn.

 

 

STEM Choosing your Subjects

books-2158737_1920-e1492199588553.jpgIts easy for the older generations to look at the subjects available at Schools that relate to STEM (Science, Technology, Engineering and Mathematics) and understand the value that they hold in the workplace today, however looking through the lens of young person choosing their option subjects its not so easy.

How do I know? Well, I am basing this on what is going on in my family circle at the moment with my son having just gone through the myriad of options available and what he wants to do as his future career. We now are waiting to see if he has the subjects that he has chosen.

One of the challenges that we faced was that the subjects in the options are grouped into a set of choices and you are steered down a set of choosing one from group A, two from B etc. A formula that seems to be based on popularity of the subject, number of teachers of that subject and the national curriculum at that time. This can be a stress full time for a young person having to make a big life decision about what career path and subjects they should take.

The value of STEM subjects is invaluable to the knowledge and building blocks for a young persons career and for their future.

The internet has made it easier these days to research a career, as you can look at the many available and what types of qualifications are needed for them.

It is also important to look at the future and what is happening in the industries related to that career path. Many industries are increasingly utilising technologies such as IoT (Internet of Things) and Mixed Reality (Augmented Reality and Virtual Reality) to help drive innovation, growth and creativity. These will help shape career paths in the future, for example:

  • An Optician  may be prescribing prescription lenses with Mixed Reality capability and need an understanding of Computing/Information Technology to program the correct settings.
  • A Jeweller or Cobbler may need understanding of electronics and computing to include the latest IoT technology into a ring or the heel of a shoe.
  • A Fashion Designer bringing IoT and wearables into the fabrics and using chemistry, physics and engineering to make new conductive/wearable fabrics that interact with surroundings, mood and environment.
  • A Hairdresser using Mixed Reality via a mirror in front of a client to show the latest hair designs before cutting or colouring takes place.

STEM subjects are the core of most of the way that the world works today and will shape the future. Help challenge the way that we think and the way that we evolve.

When choosing your options, my advice is:

  • Research your chosen career
  • Look at the future directions
  • Research people in that career and what they have done/doing
  • Attend a career event,
    • Speak to people in that career
    • Ask questions
  • Choose your subjects
  • Study and pass the exams

 

 

Building a Quadruped

Tags

, , , , , ,

Robot3I decided to have a go at building a robot for a STEM session last weekend, to show the power of code and how it can be used to control something.  A moving robot is a great visualisation to demonstrate this.

After some searching I settled on a quadruped shown on thingverse (a 3d printing site). This is a build based on a robot called Chopstick Junior by Lumi.

Parts being printed, I set about thinking about the controls and motors. The parts are compatible with an SG90 servo. I needed 8 of these, for the knee and hip joints of the quadruped.

The assembly of the parts was a bit of a challenge as in the instructions it said you needed 3mm x 6mm screw/nuts to connect the shoulders together. You really need 3mm x 8mm screw/nuts as I have to countersink the holes a bit more to get the nuts to attach to the 6mm screw length.

Inserting the servos into the holes in the hips and legs required the unscrewing of the 4 small screws in each servo and temporarily removing the gear top. Once inserted this can be replaced and screwed down.

Once the servos were in place I centered the servos the best I could to allow backwards and forwards movement in each joint. I knew that later adjustment may be needed! This can easily be achieved removing the servo arm and hip/leg, then re-positioning and attaching the arm again.

The power is provided by 4 x AA batteries in a square battery holder. This was glued down onto the frame and fitted well into the build.

The power bus is provided by a small piece of circuit board. I used two lines for -v and +v. Each servo was then wired into the lines and the control wire to an Arduino Nano which is used as the brains of the robot.

The following pins were used on the Digital I/O on the Arduino Nano:

  • D2 – Hip 1
  • D3 – Knee1
  • D4 – Hip 2
  • D5 – Knee 2
  • D6 – Hip 3
  • D7 – Knee 3
  • D8 – Hip 4
  • D9 – Knee 4

I also wired in a sensor on the front of the robot to D10 and D11.

Wiring is grouped together to allow movement, but cut to a length that reduces excess that could get in the way of the legs.

A toggle switch provides an on/off for the power fixed to the rear of the robot. Remember to break the lines on the circuit board so it does not join any of the lines.

Once assembled I then got round to coding. I decided to use the opensource code for the Chopstick Junior as a base and make alterations. The quadruped responded well to the code and several physical servo adjustments were needed. Its now in a reasonable state, however balance is an issue in terms of walking steadily, so need to work more on this.  I have not yet coded movement to respond to the sensors yet, this will be done later.

The code is available via my Github:  https://github.com/Cloudmage/Robots

The robot went down well at the STEM session. Now to tweek that code……

Top view

Robot2

Side View

Robot3

Front View

Robot1