There’s an updated version of the Arduino MQTT client available. This fixes a bug where if the client lost its connection, you had to explicitly call disconnect before you could reconnect.
Not a major issue, but one that had caught a few people out.
There’s an updated version of the Arduino MQTT client available. This fixes a bug where if the client lost its connection, you had to explicitly call disconnect before you could reconnect.
Not a major issue, but one that had caught a few people out.
Just a quick one to say I’ve made an update to the Arduino MQTT PubSubClient to fix a compile error with the latest version of the arduino software (0016).
As ever, get the updated MQTT Arduino client from here.
As I had hoped, Saturday’s Makers & Hackers event was a lot of fun. After a kick off by Alex from Tinker.it, we split up into four teams vying for the two £50 prizes up for grabs.
I was in a team with jewellery maker Kali and advertising designer Andrew. After some time spent staring at our pile of arduinos, leds, beads and felt we set out to do something around interactive jewellery; something that could react to events around you and notify you of things. Cue five hours of prototyping, coding, soldering, beading, making and hacking.
Our finished piece was a bracelet with 5 leds surrounding a central one, hidden by Kali’s great bead work, with a button to allow the wearer to interact with it. The concept was that the central led would alert the wearer to some event, such as they have new messages. The outer ring of leds could then be used to indicate the extent of the event, such as the number of new messages.
Now, clearly you have to ignore the tail of wires running off the piece connecting it to an arduino. They don’t make it very practical to wear – but there is no reason why the arduino couldn’t have become a feature of a second piece that could be worn as well – particularly if we had a Lilypad to hand. We started talking about having a jewellery ‘hub’ where each piece you wear connects together into their own network. Slightly more than we could have practically achieved on the day.
The teams were:
After a quick show’n'tell to everyone we got to vote for our favourite. Nigel and the Craft Girls came out on top of the public vote and my team got the experts choice, as voted for by the tinker.it guys there on the day.
Tinker.it will be taking both of our pieces with them to the UK Maker Faire in a couple weeks, so we’ve got a bit of time to tidy and polish before they get shown off.
You can see the rest of my photos from the day here and there is also the wider pool with photos from everyone else here.
Makers and Hackers is a one day competition open to makers of all kinds run by Folksy and Tinker.it! Show up in Sheffield or London on Feb 28th, and make a “Household items of the future” in 8 hours with the people around you!
Tickets are free, but you do have to book – check out the site for details; it should be a lot of fun.
I got an LCD shield along with a second Arduino a couple weeks ago but what with Christmas and finishing off the Orb I hadn’t had much of a chance to play with it. Until tonight.
/************************************************
* Draws a rotating 3D cube on the LCD Shield
* from Nuelectronics.
*
* Nicholas O'Leary
* http://knolleary.net
************************************************/
#include "Nokia_lcd.h"
#include <avr/pgmspace.h>
float sin_d[] = { 0,0.17,0.34,0.5,0.64,0.77,0.87,0.94,0.98,1,0.98,0.94,
0.87,0.77,0.64,0.5,0.34,0.17,0,-0.17,-0.34,-0.5,-0.64,
-0.77,-0.87,-0.94,-0.98,-1,-0.98,-0.94,-0.87,-0.77,
-0.64,-0.5,-0.34,-0.17 };
float cos_d[] = { 1,0.98,0.94,0.87,0.77,0.64,0.5,0.34,0.17,0,-0.17,-0.34,
-0.5,-0.64,-0.77,-0.87,-0.94,-0.98,-1,-0.98,-0.94,-0.87,
-0.77,-0.64,-0.5,-0.34,-0.17,0,0.17,0.34,0.5,0.64,0.77,
0.87,0.94,0.98};
float d = 10;
float px[] = { -d, d, d, -d, -d, d, d, -d };
float py[] = { -d, -d, d, d, -d, -d, d, d };
float pz[] = { -d, -d, -d, -d, d, d, d, d };
float p2x[] = {0,0,0,0,0,0,0,0};
float p2y[] = {0,0,0,0,0,0,0,0};
int r[] = {0,0,0};
Nokia_lcd lcd=Nokia_lcd();
void setup(void){
DDRB=0x2F;
LCD_BACKLIGHT(1);
lcd.cLCD_Init();
lcd.cLCD_Box(0,0,131,131,FILL,BLACK);
}
void loop(void)
{
r[0]=r[0]+1;
r[1]=r[1]+1;
if (r[0] == 36) r[0] = 0;
if (r[1] == 36) r[1] = 0;
if (r[2] == 36) r[2] = 0;
for (int i=0;i<8;i++)
{
float px2 = px[i];
float py2 = cos_d[r[0]]*py[i] - sin_d[r[0]]*pz[i];
float pz2 = sin_d[r[0]]*py[i] + cos_d[r[0]]*pz[i];
float px3 = cos_d[r[1]]*px2 + sin_d[r[1]]*pz2;
float py3 = py2;
float pz3 = -sin_d[r[1]]*px2 + cos_d[r[1]]*pz2;
float ax = cos_d[r[2]]*px3 - sin_d[r[2]]*py3;
float ay = sin_d[r[2]]*px3 + cos_d[r[2]]*py3;
float az = pz3-150;
p2x[i] = 65+ax*500/az;
p2y[i] = 65+ay*500/az;
}
lcd.cLCD_Box(0,0,131,131,FILL,BLACK);
for (int i=0;i<3;i++) {
lcd.cLCD_Line(p2x[i],p2y[i],p2x[i+1],p2y[i+1],RED);
lcd.cLCD_Line(p2x[i+4],p2y[i+4],p2x[i+5],p2y[i+5],RED);
lcd.cLCD_Line(p2x[i],p2y[i],p2x[i+4],p2y[i+4],RED);
}
lcd.cLCD_Line(p2x[3],p2y[3],p2x[0],p2y[0],RED);
lcd.cLCD_Line(p2x[7],p2y[7],p2x[4],p2y[4],RED);
lcd.cLCD_Line(p2x[3],p2y[3],p2x[7],p2y[7],RED);
delay(5);
}