Black Box
This is my Black Box. It is an art object that tracks and stores information about its environment. It does noting with the collected data except remember it, continually accumulating information about its own existence. The fours lines are time in existence, the distance in has travelled, current position and relative percentage to current position and an overall interactions count.
I have written a few post about the making of this box. Part One // Part Two . And there is likely to be more. I am going to be working on some upgrades for this including:
- charging circuit
- low power state for shipping
- Longitude/latitude configuration into regions
- memory recall- randomly recalls previous states. ie “day 34 in Brisbane, 34890 interactions”
- randomly removing or “forgetting” data
Black Box: On the tram
I have hook up my GPS module to my Black box prototype. For this I wanted to calculate the distance travelled. So I am using a gps distance calculation example, which calculates the distance between two longitude/latitude points. Code only had to be modified slightly to update the waypoint to be measured against and accumulate the total distance travelled. I took it for a tram ride. It works… As it calculates the distance between waypoints, it is more accurate the more often it updates. This code below is programmed to update every 1/4 of a sec, but mine does not get close to that. 1-5minutes seems standard. I will have to look into how to get steadier updates.
So currently it is using the four lines on the LCD to display- Time in existence, kilometres travelled, percent of the time it has been in a certain position and an interactions count. I have been working on storing these variables and data logging all collected info to SD. It took a while to get it’s memory working. Writing to SD was simple. But reading this info back and turning into meaningful data was a bit more complex (well for me it was). You need read the data back into a string and then convert string to a char array turn the array into a float/long etc… or maybe you could just read the info back into a char array. hmmm.
My new favourite friends are:
atol and atof
example:
long stringToLong(String s)
{
char arr[12];
s.toCharArray(arr, sizeof(arr));
return atol(arr);
}
The box is looking a bit worse for wear, but I wired up a shield for everything yesterday. So it is good to go. Will be making the actual box next week.
Blackbox: Part I
This is my first test of my “black box” work. I have been fond of the idea for a while of an art object that tracks and stores information about its environment. It does noting with the collected data except remember it, accumulating information about its own existence. So to do this I will be interfacing a few different sensors (GPS, accelerometer,) and putting these in a small black box with a LCD screen to display its collected data. The cardboard box is just temporary until i make the real one.
My next few posts will be the progressions of this work. I have started by testing the accelerometer. For this i have only needed to use 2-axis. At the moment it is set to display which way it is positioned. (right way up, upside down, left side up etc etc) the percentage shown is relative to how often it is in the current position compared to the other positions. So in the picture above it has been upside down for 50% of the time.
leave a comment