Big displays and tabletops – the wrong approach?
The current model
Current research trends are in favour of large public displays, hidden projectors, and table top displays – Microsoft’s Surface being a prominent example along with the many research projects involving public displays.
A lot of these projects have options for multiple users operating the systems, in fact some are made only for collaboration in the workplace (Highwire’s CoffeeTable, and Intel’s What Do You Bring To the Table?). However, when systems are in a public setting, the use becomes more of a public service than a means for collaboration and when the users are acting independently great efforts are made to determine identity and facilitate independent interaction and data presentation.
The classic example of this is where you walk up to a public display in a university and the display shows your time-table.
In the above scenario, what happens when a display is surrounded by more than one person – say 5 people. Does it show 5 individual timetables? If 50 people approach the display does it show 50 timetables? That is impractical, so what is a fair way to display a crowds worth of information to a waiting crowd? It could be shown one at a time, but then who gets to see theirs first, and more importantly how does one recognise your own timetable if you can’t remember it in the first place? Does your name have to appear with the time-table? Will public users be comfortable with this scenario? What authentication methods are used for systems such as these, do users need to opt in, will these questions have the same answers for different displays?
If we ignore other issues except authentication, how does the display know who you are to display the relevant information? Read a unique ID from your phone, a smart card, or some other wireless unique device? How does this deal with phones being sold, or smart cards being lost? What happens if someone of a criminal nature got hold of young student’s ID card and started stalking the student? Is there a line of how public information must be before it appears on a public display? Even if the display is not in a completely public setting, say it is behind the security check point in a company, who decides the amount of information which is displayed on a screen? The user, or the programmer in charge of the presentation software? If authentication is required before information is shown on a display, does this not ruin the workflow of the display – and would this not also stop frantic late users from approaching the system?
With privacy being a current issue within society, do not public displays get relegated to becoming glorified billboards with the only personal information they will be allowed to show will be that which could be found on the public page of a person? Will the only use of these systems be for when one has lost their phone, and the display is currently free?
Currently I believe the only use of these systems will be gained from location-based advertising – where content is changed based on the demographic of people around it and the time of day.
A different model
If we are looking into the future (a trait which many scientists are likely to do) there is another model which is what I believe public interacting displays should be tending towards.
By dissecting the mission of a public display it can be seen that it encompasses two functions.
- Being a dedicated geographical point for a certain type of information or request,
- Having a method to display feedback to the user.
If we look to the future and imagine a hypothetical piece of hardware exists, we can remove point 2 from the list of needed functions – and remove a lot of privacy issues.
We have this technology – albeit in a crude way – at the moment. A personal screen. Currently, this tend to be a smart phone/device of some sort. These tend to have authentication when they are switched on, via a pass code. They even support banking systems which – one would hope – worry about the security of the device in question.
The limitations of these devices are their size and resolution. A personal screen of 4 inches isn’t brilliant, so let us create a hypothetical product to facilitate this model. Imagine a pair of glasses which could project upon its lenses virtual displays at any arbitrary projection and geometry to simulate real life displays. They could even be simulated on static points in the real world, needing a user to be close to it for it to be used – as in real life. The simulated displays would be displaying what ever the public display wanted to – by virtue of its number 1 function: being a dedicated geographical point for a certain type of information or request.
Let’s go back to the 50 people in front of a timetable billboard. With their own personal screen they would be seeing just their timetable, in an almost completely private setting – while still being surrounded by 49 other people. In fact, if wireless communication density is sufficiently high, it could replace conventional screens on desks, on phones, all together. With regards to public billboards though, advertisers would be able to get what they have always wanted – a message directly to who they want it to go to.
This is of course all conjecture, but I think it should be where the domain should be heading.
Code Golf
CSLU did code golf today. I did 1 and a half tasks, which were:
- Output the first 100 prime numbers
- Output e to 100 decimal places
Prime numbers
I’m quite proud of this, I managed to do this in 55 characters initially but then after some collaboration with the rest of the club shrunk it down to 49 characters
2.upto(541){|a|i=2;i+=1 while a%i>0;p a if i==a}
e
I never got his fully working as I ended up getting caught up in list comprehensions. Ended up with:
1 + sum [1 / (product [m | m <- [1..n] ]) | n <- [1..300] ]
Which is the same as and shows how pretty Haskell is.
Ruby gem – json_serialisable
I was working on a ruby project and stumbed upon my first valid application of metaprogramming. I was creating json serialisation methods and realised they were all practically identical. So I looked at how attr_accessor worked and then wrote my own class method called attr_serialisable. This method generated serialisation methods automatically.
Example
Given a class A
class A
attr_accessor :a, :b, :c
attr_serialisable :a, :b, :c
def initialize(a, b, c)
@a, @b, @c = a, b, c
end
end
attr_serialisable would generate the following methods:
def to_json(*a)
{
"json_class" => self.class.name,
"a" => @a,
"b" => @b,
"c" => @c
}.to_json(*a)
end
def json_create(o)
new(*o["a"], *o["b"], *o["c"])
end
Which will allow the class to easily be used by the ‘json’ library.
Links
Arduino Gas Sensor – Part 2
Previously
So I left the last article with the following:
Well apart from the hardware I need, so issues need to be addressed which may or may not require extra hardware – as I’ve just thought of them.
- DateTime equivalent object for when I register a pulse
- Work out how long these will last on battery
- Can I set an interrupt to go off when a digital value hits a threshold? Or does this require analogue input? If I can it would massively save on battery as no polling! But, it may require fiddly per-house calibration, which the brute force method ignores
- Laser/3d Printed box and some form of mounting which will let me attach to anything. Probably going to be velcro
So I’ll go through what has been done since then via this criterea.
Hardware Changes
The DateTime object style thing was achieved through an RTC module (http://www.sparkfun.com/products/99) which communicated to the ‘duino using the I2C bus and takes 5V. A microSD card shield was also added to the hardware for saving events into a simple text file (http://www.sparkfun.com/products/9802).
Rather than use my hastily build photosensor, I used a load of RFXcom sensors as they are well built and have a housing designed for sticking to the meter (Which is by far the biggest engineering challenge of this project). A board layout for interfacing with the sensor units was created and the gEDA/gSchem schematic file can be found on the git hub project page.
Software Changes
Well, apart from the stuff which interfaces with the RTC module and the microSD card, not much has changed code wise. The way the RFXcom modules work was backwards to my prototype, so I measured the time it takes to discharge a capacitor rather than charge. An LED on a meter normally flashes for .1s, so the timout is set to 0.05s.
Battery Life
Using a multimeter showed the whole sensor drew 92mA. It isn’t ideal, but with a 6 AA battery pack which packs ~3000mAH which lasts a bout a day (
) However, that was with a ridiculously high powered infrared LED on the RFXcom board. Using just the photosensor (rather than the reflective) the power output was 42mA and that was with the SD card always powered. There is a lot of scope for battery life improvement on this project.
Source
The source can be found on my github page at https://github.com/carl-ellis/Arduino-Gas-Sensor .
Having trouble updating WordPress if your server is running vsftp?
The latest update to vsftp has, in their own words:
- Add stronger checks for the configuration error of running with a writeable
root directory inside a chroot(). This may bite people who carelessly turned
on chroot_local_user but such is life.
This kind of makes it useless for a virtual user setup. A work around has been published at https://bbs.archlinux.org/viewtopic.php?pid=1038842#p1038842 .
Essentially, if you set chroot_local_user=NO in /etc/vsftpd.conf it will solve the problem, but then you have the security issues of not having a chroot’d guest.
Fountain code challenge
For the second term of the 2011/2012 academic year I’ve made a small challenge for members of CSLU.
Details are found on the PDF.
Good luck.
P.S a bit of background reading can be found here.
Arduino Gas Meter Sensor – Part 1
Motivation
My newly ordered Arduino Uno came in the post today so I got to start building with it!
An upcoming sensing deployment needs a way of sensing gas usage, so I’m building a basic sensor to measure it. Luckily, most gas meters have an LED pulse which goes off every so often and we can measure that. The one in my house informs me the light will pulse every 10 dm^3 of gas, so every time the second number from the right on the meter ticks the light will pulse. Failing this, the 0 on the right most dial is very reflective, and an LED can be used to reflect light from it.
As the extra bits I need to finish the sensor hasn’t come yet, namely the SD card shield and a battery pack, I can’t lock the sensor in my gas cupboard and give it a test, so for the time being I’m turning off my computer screens and lights, then flashing a red head torch at it to simulate a pulse.
Code
After a bit of internet trawling, I found an ace site laying down how to do the wiring for a digital light sensor (http://www.ladyada.net/learn/sensors/cds.html#bonus_reading_photocells_without_analog_pins). From that, I added in a method which took a rolling average of the last 5 measurements and outputted if the measured light was brighter than 110% of the average (not exactly statistical, but I intend for these to be locked in a dark box…).
Here’s what I have so far:
/* Based on: Photocell simple testing sketch. Connect one end of photocell to power, the other end to pin 2. Then connect one end of a 0.1uF capacitor from pin 2 to ground For more information see www.ladyada.net/learn/sensors/cds.html */ // Number of measurements for averaging const int AVERAGE_LENGTH = 5; int photocellPin = 2; // the LDR and cap are connected to pin2 int photocellReading; // the digital reading int ledPin = 13; // you can just use the 'built in' LED // for the circular buffer int lastReadings[AVERAGE_LENGTH]; int average = 0; int counter = 0; void setup(void) { // We'll send debugging information via the Serial monitor Serial.begin(9600); // Initialise the array for(int i=0;i<AVERAGE_LENGTH;i++) { lastReadings[i] = 0; } } void loop(void) { // read the resistor using the RCtime technique photocellReading = RCtime(photocellPin); // Calculate rolling average ++counter %= AVERAGE_LENGTH; lastReadings[counter] = photocellReading; calcStats(); int bound = average - (average/10); // Glorious debug Serial.print("Av = "); Serial.print(average); Serial.print(" = ["); for(int i=0; i<AVERAGE_LENGTH;i++) { Serial.print(lastReadings[i]); Serial.print(","); } Serial.print("] "); if (photocellReading < bound) { Serial.print(" . RCtime reading = "); Serial.println(photocellReading); // the raw analog reading } else { Serial.println(); } delay(100); } // Calculates the new mean based on the last 20 measurements int calcStats() { // average average = 0; for(int i=0;i<AVERAGE_LENGTH;i++) { average += lastReadings[i]; } average /= AVERAGE_LENGTH; } // Uses a digital pin to measure a resistor (like an FSR or photocell!) // We do this by having the resistor feed current into a capacitor and // counting how long it takes to get to Vcc/2 (for most arduinos, thats 2.5V) int RCtime(int RCpin) { int reading = 0; // start with 0 // set the pin to an output and pull to LOW (ground) pinMode(RCpin, OUTPUT); digitalWrite(RCpin, LOW); // Now set the pin to an input and... pinMode(RCpin, INPUT); while (digitalRead(RCpin) == LOW) { // count how long it takes to rise up to HIGH reading++; // increment to keep track of time if (reading == 30000) { // if we got this far, the resistance is so high // its likely that nothing is connected! break; // leave the loop } } // OK either we maxed out at 30000 or hopefully got a reading, return the count return reading; }
Next Steps
Well apart from the hardware I need, so issues need to be addressed which may or may not require extra hardware – as I’ve just thought of them.
- DateTime equivalent object for when I register a pulse
- Work out how long these will last on battery
- Can I set an interrupt to go off when a digital value hits a threshold? Or does this require analogue input? If I can it would massively save on battery as no polling! But, it may require fiddly per-house calibration, which the brute force method ignores
- Laser/3d Printed box and some form of mounting which will let me attach to anything. Probably going to be velcro.
Here’s a video of it working:
JSXGraph
I found this cool graphing JS library which has a wordpress plugin! It’s called JSXGraph and is rather nifty!. Here is an example graphs showing Facebook users over time.
Here’s the code:
<jsxgraph width="600" height="200" box="box">
var brd = JXG.JSXGraph.initBoard('box',
{boundingbox: [-50, 900, 3000, -150],
keepaspectratio:true,
axis:true,
grid:0,
showNavigation:false});
brd.suspendUpdate();
//Points for graph
var p = [];
p[0] = brd.create('point', [0,0], {style:6,name:""});
p[1] = brd.create('point', [1665,100], {style:6,name:"100"});
p[2] = brd.create('point', [1890,200], {style:6,name:"200"});
p[3] = brd.create('point', [2050,300], {style:6,name:"300"});
p[4] = brd.create('point', [2193,400], {style:6,name:"400"});
p[5] = brd.create('point', [2359,500], {style:6,name:"500"});
p[6] = brd.create('point', [2527,600], {style:6,name:"600"});
p[7] = brd.create('point', [2672,700], {style:6,name:"700"});
p[8] = brd.create('point', [2787,800], {style:6,name:"800"});
//Line
var graph = brd.create('curve',
brd.neville(p),
{strokeColor:'red',
strokeWidth:5,
strokeOpacity:0.5});
//Labels
xtxt = brd.create('text',[1400,-110, 'Days Online'], {fontSize:12});
ytxt = brd.create('text',[10,850, 'Millions of users'], {fontSize:12});
brd.unsuspendUpdate();
</jsxgraph>
Programming languages course
So I ran a talk on learning programming languages last week. It was the second time I had done that particular talk, and in this case the hardware setup went smoothly – as it was done by Stephen Wattam the CSLU VP.
We had a pretty good turn out, mostly of year year undergraduate students who so far had only played with a little C. I took pictures of everyone hard at work doing their task … well, ok. They were mostly on tryruby.org which was even better.
It showed that they had an interest in a new language which is fairly good at prototyping and will allow them to try out their ideas fast. I may have semi pushed them on to it in my talk, so I’m glad they were listening. No one tried learning Haskell though, but then I’ll drop in on everyone next term and see how they are doing. The slides and some info for my talk can be found at the CSLU site.
On a side note … My Instagram tshirt came! I’m not sure if I’ll ever wear it outside as it’s a bit long, but still!
Rain – Agent-based water
Well I’ve been wanting to do this for a while now, and on Sunday with a freshly installed (and therefore speedy) net book under my belt, I thought I’d have a crack at it.
Last year (maybe even 2 years now) ago, I made a weak plasmoid generator with the intention of using it for terrain generation. I’ve always wanted to use that library for some agent based programming, and a simple (rule wise) example of it would be water. You put some water agents on the map they move as low as they can go, then evaporate. This kind of does that, and definitely suffers from “proof of concept” syndrome. Water moves, but to do anything fancy will require redoing, which I’ll probably end up doing on my next free Sunday.
So, using a library called Gosu to handle the drawing and the event loop, and a library called TexPlay which allowed me to modify pixels, I got a render up and running which displayed a map of tiles (1 pixel tile
), and the colour was defined with a lambda that was passed to all of them.
As I’m learning Haskell at the moment, I thought I’d give some lambdas a go, and it made it really easy actually.
There are two types of agents in this program, Rain and Sources.
- Rain just flows to a low point.
- Sources make Rains.
Rains become sources if they hit a low point, which basically has the effect of stacking the Rains that have pooled there so they can make lakes. As Rains are destroyed when they stop, and Sources can only produce a finite amount of Rains based on how many are there when it is made, the system sort of stays constant. Initial sources are given enough Rains to cover the whole map 1 deep.
That is awkward to explain.
Most of the issues with this program was making the renderer fast enough to work on a net book, and as I’m not a graphics man, I made many rooky mistakes.
This is fairly mesmirizing to watch, and I’ll definitely improve it further, by:
- Making the map colouring sample from colour->height table
- Have water level as a tile attribute to make things cleaner
- Fix evaporation
- Make it so that tiles which have a constant flow of agents over them are distinguished from one-off “rain” paths
- Fix Rain
It’s a project, feel free to fork from git hub here at https://github.com/carl-ellis/Rain
Old school screen capture.
Video here: Rain – agent-based






