Saturday, December 12, 2015

Near future of cooking and the Internet of things

This writing is not fully researched and is more of a thought experiment.  It comes from items I have read and great people I have talked to.  I just thought to myself what cooking in the future would be like and wrote it down.  Enjoy. 

All great meals start with the toilette


This is the first place of collecting data on your health in the modern home.  There are companies working on building toilettes that can analyze your health and let you know when it’s time to see the doctor.   For our scenario we will assume that the loyal commode will keep track of essential vitamins and nutrients for you.   We will also assume many other devices in the home like your bed and fitness trackers will give us a clearer picture on your overall health.  Your TV could even end up ratting you out for binge watching that favorite show.  Shame on you, you should have been exercising.

The fast way of food consumption


You pull up to a line of cars at your favorite fast food restaurant.  With your handy app you begin to build your order on your phone.  You pull up to what used to be the order speaker and simply scan your phone to submit y our order along with your nutrients requirements your app got from your home.   The restaurant builds your burger fully injected with a cocktail specifically mixed for you.  This cocktail contains flavorless vitamins and nutrients that were prescribed by your toilette.  It feels like you are eating the standard fast food but it is chemically superior. 

The “I have time to make stuff method”


You are at the store and you have a recipe that was recommended by your wearable devices.  You might have requested fried butter but it found something similar with the nutrients you need.  Your smart home has the desire of keeping you healthy.  The first step is seeing what ingredients you already have.  Your wearable device will link back to your home and ask the fridge and cabinets what items you already have off the list.  Both of these home devices can use RFID technology to scan its contents and report back the status.  For example, you might have milk but it has been in there for about a month.  Armed with this information you can purchase only what you need and return home to begin cooking.

Most recipes have you start by preheating the oven.  You will not have to worry about that in the future.  You will start to prep the meal by chopping and mixing ingredients.   Your wearable devices will guide you through the process keeping track of what step you are on.  Once the device recognized the time it will take you to finish prepping the ingredients is equal to the time it takes for your oven to warm up, it will send a signal to the oven letting it preheat to the temperature in the recipe.  Once you open the door and put your masterpiece in the oven, the door closing will start a timer automatically from the recipe.  Sensors in the oven will ensure that your food doesn’t burn and that your dish comes out perfectly.   You will be instructed when to start making the side dishes at exactly the right time so that everything is served to the table fresh and hot.  

Bon Apétite 

Sunday, November 8, 2015

Arduino Sensors in Unity by using Node.js with Express.js



For this weekend hack,  we are building a 3D game with custom control input from an Arduino board.  Watch the video and use the code below to build it for yourself.

Arduino Wiring
Arduino Code
void setup()
{
    Serial.begin(9600);
}

void loop()
{
    int amount = analogRead(0);
    Serial.println(amount);
    delay(30);
}

Node Libraries
Express - We use this for routing the web page to listen to a port. We could change this so that the user could pass in different routes to get multiple potentiometer values. 

SerialPort - This is a library used to read in the serial port data so node can parse it and put it on the web. 

Node Server Code
var express = require("express");
var app = express();
var serialPort = require("serialport");
var SerialPort = serialPort.SerialPort;
var currentSetting = 0;

 var sp =  new SerialPort("serial_port",{
    baudrate:9600,
    parser:serialPort.parsers.readline("\n")
 });

sp.on('open',function(){
    sp.on('data',function(data){
        console.log(data);
        currentSetting = data;
    });
});

app.get("/",function(request, response){
    response.send(currentSetting);
})

app.listen(portNumber);

Unity Code (javascript)
#pragma strict
private var locked = false;
private var currentSpeed = 0;

function Start () {
}

function Update () {
    transform.Translate(Vector3.left * Time.deltaTime * currentSpeed * -1);
    if (!locked)
    {
        locked = true;
        AcceleratorInput();
    }
}

function AcceleratorInput(){
    var www = WWW("http://127.0.0.1:10800/");
    yield www;
    currentSpeed = (parseFloat(www.text)/1024) * 50;
    locked = false;
}


That is all.  I hope you enjoyed this weekend hack!

Jeremy Skrdlant

Monday, June 1, 2015

Private Git for teams up to 5

I just started using a nice version control tool called BitBucket (https://bitbucket.org/).    It is free if your team is less than 5 members and you get unlimited private repositories.  It is similar to GitHub except that GitHub's free plan only works with open-source projects that are available to the public.  If you have a secret project that is going to make you millions, you might not want to put it there if a clone of your code could destroy you :)  Then again your code could save humanity and you could still end up making some good money off of it. 

Version control systems allow teams to work on the same peace of code.  They go through a process of committing, pushing, and pulling the code down to their local computers.

A normal workflow
  • Pull latest version of the software to your machine.
  • Add your features to the code
  • Test your features and ensure it doesn't break the entire system.
  • Commit your changes commenting on what you did
  • Push your changes back up to the server
There are many nice features like going back in time and having the entire development staff on the same version of code. And if you are lucky you will not have any of the dreaded conflicts where you change the same piece of code that another developer changed.  In that instance the machine gives up and asks you what should be included and what should be scrapped. 

I think that BitBucket is great for those small projects were you want to keep your code a secret.  But if you want to get noticed by employers, GitHub is definately the way to go.  The strongest way to build a portfolio is to have your projects out and visible to the public.


Link for generating a SSH Key
https://help.github.com/articles/generating-ssh-keys/ 

Happy Coding!
Jeremy Skrdlant