Logging temperature using an Arduino and AD7410 sensor

This article is a quick and dirty demonstration to hack yourself a temperature data logger which saves its results to an SD card. The sensor of use is a HTU21D, a I²C temperature and humidity sensor.

hookup

Schematic:

hookup_bb

I hooked up a HTU21D sensor to an Arduino Uno + SD-card shield and let it monitor temperature (and humidity) over an entire day:

24h_log

Here is a close-up of what happens at night:

3h_log

Source code:

/*
 SD card datalogger

This example shows how to log data from three analog sensors
 to an SD card using the SD library.

The circuit:
 * analog sensors on analog ins 0, 1, and 2
 * SD card attached to SPI bus as follows:
 ** MOSI - pin 11
 ** MISO - pin 12
 ** CLK - pin 13
 ** CS - pin 4

created 24 Nov 2010
 modified 9 Apr 2012
 by Tom Igoe

This example code is in the public domain.

*/
 /*
 HTU21D Humidity Sensor Example Code
 By: Nathan Seidle
 SparkFun Electronics
 Date: September 15th, 2013
 License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license).

 Uses the HTU21D library to display the current humidity and temperature

 Open serial monitor at 9600 baud to see readings. Errors 998 if not sensor is detected. Error 999 if CRC is bad.

 Hardware Connections (Breakoutboard to Arduino):
 -VCC = 3.3V
 -GND = GND
 -SDA = A4 (use inline 330 ohm resistor if your board is 5V)
 -SCL = A5 (use inline 330 ohm resistor if your board is 5V)

*/

#include <SPI.h>
#include <SD.h>
#include <Wire.h>
#include "SparkFunHTU21D.h"

//Create an instance of the object
HTU21D myHumidity;

const int chipSelect = 4;

// make a string for assembling the data to log:
String dataString = "";

void setup() {
 // Open serial communications and wait for port to open:
 Serial.begin(9600);
 while (!Serial) {
 ; // wait for serial port to connect. Needed for native USB port only
 }

 myHumidity.begin();
 Serial.println("HTU21D ready!");

Serial.print("Initializing SD card...");

// see if the card is present and can be initialized:
 if (!SD.begin(chipSelect)) {
 Serial.println("Card failed, or not present");
 // don't do anything more:
 return;
 }
 Serial.println("card initialized.");
}

void loop() {
 readTemp();

Serial.println("Writing data...");
 // open the file. note that only one file can be open at a time,
 // so you have to close this one before opening another.
 File dataFile = SD.open("datalog.txt", FILE_WRITE);

// if the file is available, write to it:
 if (dataFile) {
 dataFile.println(dataString);
 dataFile.close();
 // print to the serial port too:
 Serial.println(dataString);
 }
 // if the file isn't open, pop up an error:
 else {
 Serial.println("error opening datalog.txt");
 }
 delay(10000);
}

void readTemp() {
 float humd = myHumidity.readHumidity();
 float temp = myHumidity.readTemperature();

 // make a string for assembling the data to log:
 dataString = "Time: ";
 dataString += String(millis());
 dataString += String("; Temperature: ");
 dataString += String(temp);
 dataString += String("; Humidity: ");
 dataString += String(humd);
 dataString += String("%");
}

This was just a quick and dirty hack to get some instant results. I’m planing to do some more logging in the future to get a better understanding of how to approach my self build climate control. Stay tuned for more.

Arduino and AD7410 I²C temp sensor

On request, the source code of using the Analog Devices AD7410 I²C temp sensor. (Datasheet: adt7410)

#include <Wire.h>

//ADT7410 13/16-bit digital temperature sensor
//RED (VDD): 2.7 ... 5.5V
//BROWN (GND): 0V
//Arduino uno, wires:
//PURPLE 1 (SCL): SCL (near AREF, should be equal to ANALOG5)
//PURPLE 2 (SDA): SDA (near AREF, should be equal to ANALOG4)
//Arduino due, wires:
//PURPLE 1 (SCL): SCL (pin 21)
//PURPLE 2 (SDA): SDA = (pin 20)
//Arduino IDE 1.5 compatible

#define ADT7410_I2C_ADDRESS 0x48
#define tempRegister 0x00
#define configRegister 0x03
#define selectCode16bitMode 0x80


void setup() {
  Wire.begin();        // join i2c bus (address optional for master)
  Serial.begin(9600); // serial connection
  set16bitMode();
}




void loop() {
  delay(5000);
  serieelPrint(); //print on serial port
}


//set ADT7410 in 16-bit temp value mode
void set16bitMode() 
{
  Serial.println("Setting 16-bit mode...");
  Wire.beginTransmission(ADT7410_I2C_ADDRESS);
  Wire.write(configRegister);
  Wire.write(selectCode16bitMode);
}



//gives back the temperature value
float readTemp()
{
  //set read register
  Wire.beginTransmission(ADT7410_I2C_ADDRESS);
  Wire.write(tempRegister);
  Wire.endTransmission();
  //receive data
  Wire.requestFrom(ADT7410_I2C_ADDRESS, 2);
  byte MSB = Wire.read();
  byte LSB = Wire.read();
  
  //check for positive or negative sign
  boolean sign;
  if(MSB>0xA0) {
    sign=0; //negative
  } else {
    sign=1; //positive
  }
  
  //concat MSB&LSB
  float tempValue = MSB * 256;
  tempValue+=LSB;
  
  //BIN to DEC
  if(!(sign)){
    tempValue-=65536;
  }
  tempValue/=128;
  
  return tempValue;
}

void serieelPrint()
{
  Serial.print("Unit: ");
  Serial.print(ADT7410_I2C_ADDRESS, HEX);
  Serial.print(" *** temperature: ");
  //temperature readout
  Serial.print(readTemp());
  Serial.println(" degrees Celcius");
}

UPDATE: you can find my Arduino library here: https://github.com/geoffrey-vl/Easy_ADT7410_Arduino_Library

Samsung Galaxy S3 Mini CyanogenMod 12.1 (Android 5.1)

Sporting Android 4.1 and dual ARM Cortex A9 cpu’s the Samsung Galaxy S3 Mini (GT-I8190) is no longer competitive with any mid-range smartphones currently found in stores (read more). However, because of its wide community the smartphone has become a interesting target for creating custom ROM’s. In this guide I’ll go through some commands which will help you upgrading the S3 mini from stock Android 4.1 to Android Lollipop 5.1!

Notice that for performing this modification I’ll be using and SD-card and my laptop with Ubuntu 16.4 operating system installed. Before we get along make sure to visit the NovaFusion.pl website, head over to the download page and download following files:

If the site offers you the choice between Recovery and Oden take the Recovery option. It means we’re going to perform the flash through the recovery menu which is build inside the device. The Odin option is used for flashing the ROM through the Odin utility for Samsung smartphones. Caynogenmod 12.1 is the custom ROM we’re going to install and features Android Lollipop 5.1. TWRP Recovery is an enhanced software tool which is more feature rich than the S3 Mini’s default recovery tool. We need it to flash to custom ROM. Also head over to the opengapps.org website and download the latest Google Apps application suite compiled for your platform. To be sure you have the correct version select following checkboxes before hitting the download button: “ARM Platform”, “Android 5.1”, “stock variant”. This stock variant of Google Apps (often referred to as Gapps) includes a whole list of Google applications: Play Store, Chrome browser, Calculator, Drive, Docs, Keep, Fitness, Keyboard, Maps, YouTube, … See the complete list here. You can also use following link which will take you directly start downloading Gapps for you Samsung S3 Mini: Gapps for Samsung S3 Mini.

Now grab your SD-card, head over to your computers download folder and copy the Gapps and Cyanogenmod zipfiles onto your SD-card. After copying has been completed install the SD-card into your S3 Mini. Next we’re going to boot or reboot the smartphone into “download” mode (sometimes also referred to as “Odin” mode). You can this by holding Power + Volume Down + Menu buttons at the same time when powering up your smartphone. You can also reboot into download mode when your phone is on by installing Google’s ADB debug tool (sudo apt-get install android-tools-adb android-tools-fastboot) and issuing following command: adb reboot download. Note that must have USB debugging enabled and you must be connected to your device.

All-Galaxy-S3-Download-Mode-580x362

booting Samsung Galaxy S3 Mini into “download/Odin” mode

The download mode is specific to Samsung smartphones, but it is similar to the Fastboot mode found on many different smartphones with unlocked bootloader.

Next we’ll use the Heimdall tool to flash the TWRP recovery tool into our smartphone’s memory. On Ubuntu you can install it by issuing following command: sudo apt-get install heimdall. On your computer head over to you download folder and unzip the twrp’s zipfile. Inside the unzipped folder you’ll find a “recovery.img” image file which we’ll flash. Open a command terminal from this location and issue following command:

sudo heimdall flash –Kernel2 recovery.img –no-reboot

We’ll get following outcome:

Heimdall v1.4.0

Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...

Initialising protocol...
Protocol initialisation successful.

Beginning session...

Some devices may take up to 2 minutes to respond.
Please be patient!

Session begun.

Downloading device's PIT file...
PIT file download successful.

Uploading Kernel2
100%
Kernel2 upload successful

Ending session...
Releasing device interface...

This command flashes the TWRP’s binary image “recovery.img” into the “Kernel2” recovery partition. On your smartphone a blue bar will appear that will show the progress. If for some reason this “Kernel2” partition is not available on your S3 Mini you can discover the target partition by yourself by issuing following command:

sudo heimdall print-pit –verbose

It will result in following outcome (the target partition is marked in blue and can be found because it is the partition holding the recovery.img Flash filename):

Heimdall v1.4.0

Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
 Manufacturer: "SAMSUNG"
 Product: "SAMSUNG USB DRIVER"
 Serial No: " "

length: 18
 device class: 2
 S/N: 3
 VID:PID: 04E8:685D
 bcdDevice: 0100
 iMan:iProd:iSer: 1:2:3
 nb confs: 1

interface[0].altsetting[0]: num endpoints = 1
 Class.SubClass.Protocol: 02.02.01
 endpoint[0].address: 83
 max packet size: 0010
 polling interval: 09

interface[1].altsetting[0]: num endpoints = 2
 Class.SubClass.Protocol: 0A.00.00
 endpoint[0].address: 81
 max packet size: 0200
 polling interval: 00
 endpoint[1].address: 02
 max packet size: 0200
 polling interval: 00
Claiming interface...
Setting up interface...

Initialising protocol...
Protocol initialisation successful.

Beginning session...

Some devices may take up to 2 minutes to respond.
Please be patient!

Session begun.

Downloading device's PIT file...
PIT file download successful.

Entry Count: 25
Unknown 1: 1598902083
Unknown 2: 844251476
Unknown 3: 28519
Unknown 4: 25708
Unknown 5: 28261
Unknown 6: 0
Unknown 7: 0
Unknown 8: 0


--- Entry #0 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 1
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 0
Partition Block Count: 256
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: MBR,GPT
Flash Filename: 
FOTA Filename:


--- Entry #1 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 2
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 256
Partition Block Count: 768
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: MasterTOC
Flash Filename: STE_boot.bin
FOTA Filename:


--- Entry #2 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 70
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 1024
Partition Block Count: 2048
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: PIT
Flash Filename: goldenxx.pit
FOTA Filename:


--- Entry #3 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 71
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 6144
Partition Block Count: 2048
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: MD5HDR
Flash Filename: md5.img
FOTA Filename:


--- Entry #4 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 3
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 8192
Partition Block Count: 1024
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: STEboot1
Flash Filename: STE_boot1.img
FOTA Filename:


--- Entry #5 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 4
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 9216
Partition Block Count: 1024
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: STEboot2
Flash Filename: STE_boot2.img
FOTA Filename:


--- Entry #6 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 5
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 10240
Partition Block Count: 1024
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: Dnt
Flash Filename: dnt.ssw
FOTA Filename:


--- Entry #7 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 6
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 11264
Partition Block Count: 1024
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: reserved
Flash Filename: 
FOTA Filename:


--- Entry #8 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 7
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 16384
Partition Block Count: 2048
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: CSPSAFS
Flash Filename: cspsa.img
FOTA Filename:


--- Entry #9 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 8
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 18432
Partition Block Count: 2048
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: CSPSAFS2
Flash Filename: cspsa2.img
FOTA Filename:


--- Entry #10 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 9
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size/Offset: 20480
Partition Block Count: 32768
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: EFS
Flash Filename: EFS.img
FOTA Filename:


--- Entry #11 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 10
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size/Offset: 53248
Partition Block Count: 32768
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: ModemFS
Flash Filename: modemfs.img
FOTA Filename:


--- Entry #12 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 11
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size/Offset: 86016
Partition Block Count: 32768
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: ModemFS2
Flash Filename: modemfs2.img
FOTA Filename:


--- Entry #13 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 12
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 118784
Partition Block Count: 102400
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: Fota
Flash Filename: ssgtest.img
FOTA Filename:


--- Entry #14 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 13
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 380928
Partition Block Count: 128
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: IPL Modem
Flash Filename: ipl.bin
FOTA Filename:


--- Entry #15 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 14
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 385024
Partition Block Count: 28672
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: Modem
Flash Filename: modem.bin
FOTA Filename:


--- Entry #16 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 15
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 417792
Partition Block Count: 4096
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: Loke4
Flash Filename: normal.bin
FOTA Filename:


--- Entry #17 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 16
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 421888
Partition Block Count: 4096
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: 2ndLoke4
Flash Filename: normal2.bin
FOTA Filename:


--- Entry #18 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 17
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 425984
Partition Block Count: 32768
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: PARAM
Flash Filename: param.lfs
FOTA Filename:


--- Entry #19 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 18
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 458752
Partition Block Count: 32768
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: Kernel
Flash Filename: boot.img
FOTA Filename:


--- Entry #20 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 19
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 491520
Partition Block Count: 32768
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: Kernel2
Flash Filename: recovery.img
FOTA Filename:


--- Entry #21 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 20
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size/Offset: 524288
Partition Block Count: 2457600
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SYSTEM
Flash Filename: system.img
FOTA Filename:


--- Entry #22 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 21
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size/Offset: 2981888
Partition Block Count: 1720320
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: CACHEFS
Flash Filename: cache.img
FOTA Filename:


--- Entry #23 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 22
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size/Offset: 4702208
Partition Block Count: 655360
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: HIDDEN
Flash Filename: hidden.img
FOTA Filename:


--- Entry #24 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 23
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size/Offset: 5357568
Partition Block Count: 0
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: DATAFS
Flash Filename: userdata.img
FOTA Filename: remained

Ending session...
Rebooting device...
Releasing device interface...

Sometimes you might bump into issues where the command line returns an error like “ERROR: Failed to receive handshake response. Result: -7“. To resolve this issue simply repeat the command or reboot your device into download mode once again.

When flashing has completed we should reboot the phone into recovery mode. You can do this by powering up your S3 Mini and holding the power + Volume Up + Menu buttons at the same time.

enter_recovery_mode_on_Galaxy_S3

booting Samsung Galaxy S3 Mini into “recovery” mode

Note that you should make sure to reboot into recovery directly after flashing TWRP. If for some reason your smartphone would have booted into normal mode again instead of recovery, the boot subsystem might have a protection system which restores the default recovery image into the recovery partition in place of our custom TWRP recovery image.

Once TWRP recovery is loaded you’ll be presented with following user interface:

1419274212077

TWRP recovery graphical interface

Before actually flashing Cyanogemod on your device it is best to make a backup. You can do this though the Backup button. Once this had completed you should perform a factory reset. This will wipe data, cache and dalvik cache. It can be done by using the Wipe button, next chose Factory Reset. To install Cyanogemod hit the Install button and select the cmXXX.zip file from you external storage device (SD-card). This process might take a while. Once this has completed redo the same process but this time install the gapps zip file that we also copied to the SD-card. Once installation has finished, return to the main menu and select Reboot, then System. The device will now boot into CyanogenMod 12.1 (Lollipop). The first boot into CM12 might take an addition large amount of time as some software still needs be installed automatically in the background. Before actually entering the Android main screen the Google’s setup wizard will also ask you for your google account and so on. Once you’ve completed the wizard the Android main menu will arise and you can go on using Android Lollipop on your Samsung Galaxy S3 Mini!

Screenshot_2015-03-25-18-04-36-338x600

CyanogenMod 12.1 for Samsung Galaxy S3 Mini

Google Cardboard and the casual Android phone

A while ago I was attending the “Virtual Reality & 360° contentbeleving” event in AB Brussels, main subject: new ways of consuming media content through virtual reality and augmented reality. I applause the AB for having this kind of events, VR is very probable finally going to break through after multiple failures and it’s going to bring new ways in which we consume media. For example 360° video, imagine going to the cinema and be able to see the latest dinosaur film with a full 360° view. You hear crackling leaves at the left of you, you look left and what’s there… just a bird! But now suddenly a dinosaur jumps up in front on your right side so you quickly look right and get scared like hell. Film makers can use these abilities  in their storytelling, even more than they can do now with 3D cinema and surround sound. Every one who has been following the current new hype in VR can certainly name a lot more use cases, and for this it was not a bad idea to attend the AB event because some of the speakers shared their ideas on how they see VR fit into commercial usage aside of the traditional gaming experience.

What was even more interesting is that we could actually test one of the scenario’s/use cases: visiting New York on the back of a small motorcycle with a 360° view. This was my second VR experience, where the first one was using some Oculus Rift def kit, now we were being set in VR using the Samsung Gear VR (Innovators Edition). I have no idea what kind of phone was used inside the Samsung Gear VR (it uses a Samsung smartphone), but what I found partly disturbing is that I noticed rather quickly that I was looking at a screen instead of really having the immersive feeling that VR is promoted with nowadays. There was also the talk about using Google’s Cardboard in combination with any kind of smartphone, and with the costs down to only a few euros there was no real argument to not give it a shot.

51ysHbDVU-L._SX425_

Cardboard us noting more that a folded paper box, some cheap lenses and  tape to hold it all together. All hardware is inside the phone. And while they claim that using the Cardboard is now already available to the masses, it is a far cry from what Oculus Rift and others will be able to provide us. if your phone is not of the newest kind, probable the screen resolution will be so low that your looking at pixels instead of images. Furthermore you’re probable also missing a sensor (or two?) which will make your head mounted display rather useless in ways of experiencing 360° content. Okay, there are Google Cardboard videos on Youtube, but that about the best you can get out of a regular smartphone which is not of the newest breed. All together: I think we’re trying really hard to make it work, but we’re not there yet and I’m really eager to see how the consumer market models are going to work out when they hit the market early 2016. Time will tell!

Add mono runtime to “Open With” menu in Ubuntu 14.04

After installing the mono package and monodevelop IDE you may want to easily execute your mono executable. If you have wine installed, executables may be executed through Wine, or maybe Ubuntu is opening your application with some other sort default application like the file archiver… And then you right-click the application but mono is not in the “Open with” menu… Here is how we can add the mono runtime to the file right-click “Open with” menu!

  • Navigate to /usr/share/applications. Create the monoRuntime.desktop file:
    sudo touch monoRuntime.desktop
  • Edit the file:
    sudo vim monoRuntime.desktop
  • Enter following content and save+exit vim:
    [Desktop Entry]
    Version=1.0
    Encoding=UTF-8
    Name=Mono Runtime
    GenericName=.Net Runtime
    Comment=Execute .NET applications
    Exec=mono %F
    TryExec=mono
    Icon=monodevelop
    StartupNotify=true
    Terminal=false
    Type=Application
    MimeType=text/x-csharp;application/x-mds;application/x-mdp;application/x-cmbx;application/x-prjx;application/x-csproj;application/x-vbproj;application/x-sln;application/x-aspx;text/xml;application/xhtml+xml;text/html;text/plain;
    Categories=GNOME;GTK;Development;IDE;
    X-GNOME-Bugzilla-Bugzilla=Ximian
    X-GNOME-Bugzilla-Product=Mono runtime
    X-GNOME-Bugzilla-OtherBinaries=mono

Now go to your executable, right-click it and see the mono runtime application option appear:

monoruntime

Self Synchronizing Wifi Clock, V2

Since my last encounter with a self synchronizing wifi clock I ended up learning how to implement my own display driver. Unfortunately the display died on me when testing it on a new power supply (which appeared to be malfunctioning afterwards) and so I have been thinking of porting my code to use the Adafruit 2.8″ display.  Pretty much most of the functionality remains from what I’ve made before, the most interesting thing I wanted to add this time was making use of the resistive touch screen. I could easily made a basic GUI to adjust settings and so on, but by some unknown reason I can’t get the touch positioning to work reliable on the Due board. Though it does function on Uno, Uno does not offer the needed program space (I’m at 40~50k). So, all together there is not much to it, but here is what I ended up with:

Next, I’ll check if there is the possibility to hook it up to Raspberry Pi and control it using NodeJS. Enjoy the holidays, see you in 2015!