Skip to main content

Welcome to Geoff Hayward's Weblog

Commenting on Java, JavaFX, Java EE, Joomla, and IoT.

During this coming Thursday's Edison Hackathon, at the FabLab, I am hoping to control a robot car by voice. In preparation I have made a JavaFX voice controller UI. And I have put together a 4-wheel drive robot car chassis kit.

The voice controller uses the IBM Watson Speech to Text service. Since recording the video below I have tried commands with context such as "turn left", "reverse the car ". This has had better results. Using phrases, I added regex (word matching) to pull out the commanding verb from the phrase. The commands are then sent as HTTP GET request to whatever IP address and port is given. The Edison will be on the car processing the GET requests via WIFI and acting upon them.



The video below is the running 4-wheel drive robot car chassis kit. To get it working I used an Arduino. I will, of course, swap the Arduino for the Edison before Thursday. The motors are powered by battery, I think the Edison will still be powered by mains (but I am going to seek advice on the day).



As you can see I am all set ready for the FabLab Edison Hackathon: very excited.



Read

This week's post is short; I ran out of time before the next session.

At last week's session we where given a 5 minute challenge. The challenge was to make an LED light up when a button is pressed down. Here is the outcome of the 5 minute challenge.



And here is the code I came up with during the challenge.

var groveSensor = require('jsupm_grove');

var button = new groveSensor.GroveButton(5); 
var led = new groveSensor.GroveLed(2); 

function doLight(){         
    led.write(button.value());           
}

setInterval(doLight,300);

As you can see the button is plugged into D5 of the Seeed Base Shield. And the LED is plugged into D2. 'D' for digital.

In tonight's session we are going to be shown how to send data up to IBM's BlueMix. It going to be fun.



Read

In last week's 2nd session of the Edison board class a lot of the time was spent making sure everyone was set-up ready to start making stuff. We were also introduced to the Grove Starter Kit Plus for the Intel IoT Edison Board.

The Grove Starter Kit Plus for the Edison Board is an interesting collection of sensors. The box includes many sensors, many LEDs, a buzzer, the base shield for Arduino and a stepper motor. Here is the full list of what's in the box:

  • Base Shield v2
  • Grove LCD RGB Backlight
  • Grove Buzzer
  • Grove Sound Sensor
  • Grove Touch Sensor
  • Grove Temperature
  • Grove Light Sensor
  • Grove Rotary Angle Sensor
  • Grove Button
  • Grove LED Socket with 3mm Red LED
  • Grove LED Socket with 3mm Green LED
  • Grove LED Socket with 3mm Blue LED
  • Grove 3-Axis Digital Accelerometer(±1.5g)
  • Grove Piezo Vibration Sensor
  • micro-USB cable

Our homework; get something working with the starter kit. I thought I would have a play with the LCD RGB backlight screen and the temperature sensor. This is what I made:

 Edison Board with the Grove Starter Kit set up to show the temperature on the screen.

The code that I wrote for this is:

var jsUpmI2cLcd  = require ('jsupm_i2clcd');
var groveSensor = require('jsupm_grove');

var lcd = new jsUpmI2cLcd.Jhd1313m1(6, 0x3E, 0x62); // Initialize the LCD
var temp = new groveSensor.GroveTemp(0);
 
function doTemperature(){
    var value = temp.value();
    doPrint(value);
    doColour(value);
}

function doPrint(value){
    lcd.clear();
    lcd.setCursor(0,0); 
    lcd.write("Temperature");
    lcd.setCursor(1,0);
    lcd.write(value.toPrecision(2) + "C");
}

function doColour(value){
    if(value <= 17){
           lcd.setColor(0, 0, 250);    
    }
    if(value > 17 && value < 25){
           lcd.setColor(0, 225, 0);    
    }
    if(value >= 25){
           lcd.setColor(225, 0, 0);    
    }
}

lcd.setCursor(0,0); 
lcd.write("Loading");
setInterval( doTemperature, 3000);

I found the Seeed Wiki to be a very good resource for getting going with the sensor and LED RBG screen.

That's it for this week. The next session is tomorrow. I will have an update soon.


Tags: Edison

Read

Intel have announced that the Edison board now supports Java. This is good news for Java developers.



Read

Last night I went along to the first session of the Edison board class that is being run by the local FabLab. This class will, hopefully, take me from a novice to a maker on the Edison board in six weeks. The class will end on a huge high as the final session is going to be a day's Hackathon. How awesome is that?

In last night's session two very knowledgeable and friendly volunteers, Ian and Simon, talk the class through the features of an Edison Board. They also showed us how to set-up a PC so that it can work with the Edison board.

The session began with an introduction to the features of the Edison board. The Edison boards features include:

  • Dual-core CPU
  • WiFi
  • Bluetooth 4.0
  • 1 GB DDR
  • 4 GB FLASH memory
  • Runs Yocto Linux

Ian and Simon also give us an idea of what the board and its features can do. An idea such as, controlling outside lights using the whereabouts of a connected GPS device.

Next we learnt about expansion boards. We learnt that there are several expansion boards for the Edison, such as the ones made by Sparkfun. And that you can create your own expansion board, if you plan to attach an Edison board to your own product. During this FabLab class we are using the Arduino Edison Kit (expansion board). Here, in the following video, is an overview of the Arduino Edison Kit we are using.



Once Ian and Simon had bought us up-to-speed on the Edison board and the Arduino kit's features they showed us how to connect them up. Just like in the un-boxing and assembly video from Intel (below).



Finally, we set-up the drivers on our laptops so that next week we can start coding and attaching sensors. Our homework, for the week, is to set-up the Edison Eclipse for C/C++ IDE, set-up the Arduino IDE, and to set-up the Intel XDK IDE.

Sadly, I don't think I am going to get to use Java with the Edison board for the time being. However, I can make do with C/C++ and or JavaScript. I think the idea behind installing the three IDEs is to let us try out the different ways to code for an Edison board.

If you are interested in how the class is going keep an eye out on this blog because, I am planning to add an update post after each of sessions.


While looking for the other two video's I found the 'step-by-step guide to windows' by Carlos Montesionos to be very good. So I thought I would add it to the end of this post.



Tags: EdisonFabLab

Read

Mailing List


Responsive Media

With the ResponsiveMedia plugin for Joomla it is easy to add 3rd party content from YouTube, Vimeo, and Instagram right in to any Joomla! article.

ResponsiveMedia