HackIllinois: A Battle for the Top

A bead of sweat trickled down my forehead as I ejected an empty magazine from my rifle and loaded a fresh one back in its place. We were far from the target and had already lost five out of the eight soldiers in our squad, who knew what the rest of the platoon was up to. I could feel my body pump adrenaline as my last two brothers and I entered the elevator. I pushed the third floor button and the door closed ever so slowly as it proceeded to accelerate us skyward.

Clearing buildings, close quarters combat, and guerrilla combatants are what Austin, John, and I were expecting as soon as the elevator doors opened.  We got into our positions and were ready to go as the doors began to open.  Our fates would soon be revealed.

12 targets. We began firing in unison as if three soldiers were one for that brief moment. In the midst of the chaos and bullets whizzing by my ears, I could hear the sounds of Austin and John getting hit and going down.

The firefight ceased and dust lingered in the air. I made out a vague figure approximately 20 yards ahead of me. I missed one! I could see him, but could he see me? As if that particular thought had triggered some unlucky divinity, the dust settled just enough. We made eye contact.

Out of nowhere the buzzer sounded.  Dinner is being served.  It’s Panda Express.  Nerf war, over.

During Hacking

 

Screen Shot 2015-03-06 at 5.43.13 PM
 

This past weekend, I was able to attend HackIllinois, University of Illinois’s official hackathon in partnership with Major League Hacking.  For those of you who have never been to University of Illinois at Urbana–Champaign, it is quite the trek from Chicago; so, after flying into O’Hare, I began my journey south, passing countless open areas and corn fields.  After the two and half hour drive, I arrived on campus where I set up, unpacked my goodies, and greeted the excited hackers who would shortly begin their 36 hour hacking marathon. After opening ceremonies concluded, dinner was served, and the countdown clock began ticking as hacking commenced at 10pm Friday night.

There was so much to do throughout the event!  Hackers could take breaks from coding to attend talks, chat with sponsors, participate in cup stacking competitions, and even get involved in a full out capture the flag-ish Nerf war that took place in an entire building on campus (see recap at beginning of this post)! After all was said and done, hacking ended promptly at 10am on Sunday.  Lunch was served and eaten, and the hackers hastily went to the expo hall to set up their tables to display the projects they worked so diligently on over the weekend.

 

Screen Shot 2015-03-06 at 5.43.33 PM
 

Mailjet’s API Winner

This time around, Mailjet offered 4 Fitbit Charges to the team that best used Mailjet’s API in their hack.  It was a tough decision, but team CloudScout took the gold for us.

Screen Shot 2015-03-06 at 5.43.45 PM
 

Their hack was a very insightful and innovative approach to aiding disaster victims stranded without connection to internet or mobile reception when cell phone towers go down.  The team built a quadcopter with an attached Arduino Yun.  After disaster strikes and renders cell phone towers unusable, the quadcopter flies to the disaster zone, hovers about, and uses the Arduino Yun as a WiFi beacon for the victims to connect to.  Once connected the quadcopter’s WiFi, a web page is automatically brought up that allows inputs for writing emails – through Mailjet’s Send API and text messages – through Twilio’s API – that are then saved and eventually sent to friends and loved ones informing them of their current status.  Once the quadcopter’s missions is complete, it returns to it’s docking station where it connects to the internet and sends the saved emails and texts it received during flight (through Mailjet’s Send API and Twilio’s APIs respectively).

Great job, Team CloudScout.  Awesome hack that will potentially pave the way to transforming disaster relief.

Presentations and Winners

At this particular event, winners were broken down into hardware and software categories.  This was the first time I have encountered this, and it seems fitting to consolidate the two into separate judging standards.

Hardware

Oculus Scooter

Equipped with an Oculus Rift, a scooter, a single roller skate, and few pieces of hardware, this team set out to create a Virtual Reality environment which minimized motion sickness who are sensitive to this in VR applications.  Taking some sound advice from a professor of theirs – users are less likely to get motion sickness if the VR application moves as a direct result of the user’s physical movement – they decided simulating a scooter ride was the way to go.

Users slip on the Oculus, put on the roller skate, jump on the “scooter”, and begin racing on a virtual race track.

Cloud Scout

Mailjet’s API Winner, as mentioned above.

ButtonLight

Screen Shot 2015-03-06 at 5.47.58 PM

Gone are the days of forgetting to feed the dog, doing the dishes.  Enter the days of accountability in the household.  Using a SparkCore and a button, a ButtonLight is placed where the task takes place (aka next to the dogs bowl).  If you feed the dog, press the button and the LED on ButtonLight turns off.  After 8 hours, ButtonLight resets itself and the LED turns back on showing that the dog needs to be fed again. Household members can also check out the Android app which shows each ButtonLight’s statuses.  If for whatever reason Scruffy the dog doesn’t get fed, each household member will receive a text to remind them.

Software

VR Spec

Screen Shot 2015-03-06 at 5.44.14 PM

Ever had that feeling in college where you didn’t want to get up and go to your lecture?  Well, now with VR Spec, you don’t have to!  Simply throw on an Oculus Rift on and attend the lecture remotely.  Users can even take virtual notes using a Wacom Tablet without having to see their physical hand.  You can still get straight A’s but will never have to move from your couch again.

Teleport

Screen Shot 2015-03-06 at 5.44.20 PM

We’ve all been there before. Missing out on an even because we’re sick or it’s simply too far. Now with Teleport, you can experience all the great things you’ve been missing without having to actually be there.  On one end, User 1 wearing a 360-degree panoramic camera video camera that walks about the environment normally.  This video feed is then sent to User 2 on the other end wearing a Google cardboard kit allowing him to see the environment User 1 is experiencing.  User 2 wants to look to the rear?  No problem.  User 2 simply rotates and checks out what’s going on thanks to User 1’s 360 panoramic ability.

Screen Shot 2015-03-06 at 5.44.25 PM

Introducing: New Newsletter Action Endpoints API

‘Action’ Syntax

We are very excited to announce today that Mailjet is releasing ‘action’ endpoints for our newsletter resource. With this API update, the management of the newsletter contents — scheduling, and testing of a newsletter — can all be done with ‘actions’ on the newsletter object.

To begin, we are releasing four ‘actions’ to the newsletter endpoint:

/detailcontent
/schedule
/send
/test

Each of these ‘actions’ coupled with the newsletter API endpoint and the newsletter ID execute their respective functions. These new endpoints are as follows:
https://api.mailjet.com/v3/REST/newsletter/:id/detailcontent
https://api.mailjet.com/v3/REST/newsletter/:id/schedule
https://api.mailjet.com/v3/REST/newsletter/:id/send
https://api.mailjet.com/v3/REST/newsletter/:id/test

All you do is substitute the ‘:id’ with the actual numerical ‘:id’ of the newsletter (i.e. http://api.mailjet.com/v3/REST/newsletter/3/detailcontent) and you’re ready to start creating, testing, and sending newsletters!

/detailcontent

Allows you to manage the content of a newsletter — i.e. creating, editing, or attaching the HTML or text part of it. You can create, update, view, and delete any content you make for a particular newsletter before sending it out. To do so, simply attach the content in a JSON packet in the body.

Sample code
Methods allowed
POST, GET, PUT, DELETE

Create Newsletter Content
To manage the newsletter content, perform a POST request with the ‘Text-part’ and ‘Html-part’ in a JSON structure. Keep in mind, if a POST request is done and one of the two aforementioned parameters is missing, it will delete the respective missing parameter for the particular newsletter you are manipulating. Use a PUT (see below) to avoid this — there is no need to first POST content before updating, since only HTML or text are required.

Get Newsletter Content
To see the newsletter content, perform a GET request 

This will return the following:

Update Newsletter Content
To update the the ‘Html-part’ or ‘Text-part’ of a newsletter, perform a PUT request with either the ‘Html-part’ or the ‘Text-part’. Unlike performing a POST request to this endpoint, if one of these is not included in the JSON structure, it will not be deleted. This allows for partial updates of newsletter content.

Delete Newsletter Content

/schedule

Allows you to schedule when the newsletter will be sent out. To schedule, simply attach the ISO 8601 date you wish the newsletter to be sent out at in a JSON packet in the body. You can also use “NOW” instead of a timestamp to send immediately. In that case, you can also use the send method, described below.

Before allowing the ‘/schedule’ method to go through, the API will check that all the pertinent newsletter information has already been created — sender email, sender name, subject, contactlist, newsletter status, and HTML/text. If one of these is missing, the API will throw an error your way for you to correct and try again.

Sample code

Methods allowed
POST, DELETE

Schedule a Newsletter
To schedule a newsletter, perform a POST request with the ISO 8601 date you wish to send it out at:

Cancel a Newsletter
To cancel the sending of a newsletter, perform a DELETE:

/send

Allows you to send the newsletter. This API call is equivalent to using, as mentioned earlier, “NOW” as the timestamp in the ‘/schedule’ action endpoint.

Similar to ‘/schedule’, before allowing the ‘/send’ method to go through, the API will check that all pertinent newsletter information has already been created — sender email, sender name, subject, contactlist, newsletter status, and HTML/text. If one of these is missing, the API will throw an error your way for you to correct and try again.

Sample code

Methods allowed
POST

Send a Newsletter Now
To send a newsletter immediately, perform a POST request:


/test

Allows you to test send the newsletter to an email address. This is to make sure you’ve “dotted all of the ‘i’s and crossed all of the ‘t’s” before sending your newsletter to the masses. To do so, simply add the name and email of the intended test email recipient in a JSON packet in the body.

Similar to ‘/schedule’ and ‘/send’, before allowing the ‘/test method to go through, the API will check that all the pertinent newsletter information has already been created for the newsletter — sender email, sender name, subject, newsletter status, and HTML/text. If one of these is missing, the API will throw an error your way for you to correct and try again.

Sample code

Methods allowed
POST

Send a Test
To send a test newsletter, issue a POST request:

Documentation
You can check out all of the new additions to our ‘/newsletter’ documentation here.

FAQ

I already have “creating” and “sending” implemented via the API. What does this mean for me? Do I have to recode some software?

No, but you’re more than welcome to check out and implement our new ‘action’ endpoints. Most importantly, you don’t have to change any of your currently working software if you don’t wish to.

I still can’t find my API key and secret key. Where can I find them?
You can find them here: https://app.mailjet.com/account/setup

Email Controlled Christmas Tree

‘Tis the Season

IMG_1652Ho ho ho! ‘Tis the season to be jolly and give. Not only this, but ’tis also the season to build some dope Christmas themed hardware! Here at Mailjet, we decided to put together a Christmas tree that has lights and an LED dot matrix (acting as the star on top) that is controlled via email through our inbound email processing API – Parse API. Want the lights to be blue? Email christmas.tree@mailjet.com with the commands and it will change! Want a beautiful gold star displayed on the dot matrix at top? Email that in the subject line and it will update!

In this post, I’m going to give a step by step guide for amateurs in the hardware game on how to wire the components, upload the software, and have a fully functioning email controlled Christmas tree of your own.

 

Want to see one in action before making one of your own?

Hop over to our site for the live feed and a list of current commands. Email your commands to christmas.tree@mailjet.com and watch as it applies your updates in real-time. Here’s an example of how to send your commands:

email-example
 

What you’ll need

Hardware
Here is a list with all of the links where to purchase:

image

I purchased all of my components from Adafruit. They are super reliable and provide libraries for most of their hardware and breakout boards.

I purchased the Christmas tree on Amazon. I choose a 2ft tall one, seeing as it would be in an office. For this height, I figured 2 meters should suffice. Also, I found that 30 LEDs per meter was a good amount for this height. If you wish to have more lights on your tree, I would get the 60 LEDs per meter strip . Keep in mind, this will increase the total cost of your project.

The microcontroller I used is the Spark Core. The reason I picked the Spark Core is that it is Arduino-like and has a built-in WiFi module. To access the Spark Core via WiFi, all you have to do is declare a function, the endpoint to call it at, and Spark Core will execute this function when a POST request is done to the endpoint. It’s super easy, very efficient and so, it was the logical choice for this particular project.

Once you get your Spark Core, head on over to their getting started page. This will give you a brief overview on how to use it. Essentially, you will need to make an account and connect the Spark Core to your local WiFi. Having the Spark Core connected to WiFi is essential for this project, so make sure this is working before beginning.

After acquainting yourself with the microcontroller, go to their Web IDE. There, you will find two essential codes you will need to communicate with the Spark Core – your “Device ID” and your “Access Token”. Without these, you will not be able to change the lights on the tree.

Software
You’ll need four essentials:

I have consolidated all of the software you need in this Github repository so you can get your tree up and running as quickly as possible. Simply clone the repo, initiate Mailjet’s Parse API, get the server up and running, and upload the software to the Spark Core.

 

How everything will interact

You may be asking yourself how this whole thing will play out in real-time. We will essentially have four pieces of technology interacting with each other, much like a game of telephone. One piece gets information from the previous, manipulates it a bit to make it easier for the next piece of technology to understand, and then dumps this data onto the next piece, all the way until we have LEDs changing colors!

mailjet-christmas
First, a person will send an email to the email address you have associated with Mailjet’s Parse API. Mailjet’s Parse API will then receive this email, dissect it down into it’s individuals components (to, from, subject, body, etc.), and then dump the contents of that email onto the web server via a POST request. The web server then takes the pertinent information – the commands – from the the body of the email, performs a bit more logic and formatting before it sends them over to the Spark Core via another POST request. The Spark Core receives the information and executes the functions defined in it’s firmware for changing the LEDs, the dot matrix background, and icons depending on the commands it has received.

 

Wiring

First, I will explain how to wire the LED strip and the LED dot matrix. Then, I will explain the Spark Core software that controls each of these. Then, I will explain how to setup your Mailjet Parse API instance. Last, I will explain how to setup the web server that will accept the emails from the Parse API that then communicates with the Spark Core.

 

LED Strip

First thing’s first, place the Spark Core in the middle of the your breadboard. To keep with consistency, make sure the “+” lines are always to the left of the “-“.

image (1)
There will be four wires coming out of the LED strip: one red, one white, and two black. The black and red wires on the left-hand side are the ground and power, respectively, lines for powering the strip. The black and white wires on the right-hand side are the ground and logic wires, respectively, for the updating the colors of the LEDs on the strip. Basically, the ones on the left make it light up and the ones on the right change the colors.

sds2QEW9EDwX2DDYDWK1slw
Insert the exposed wires for the power into the female end of a male-female wire. Next, insert a jumper wire into each of the logic wires.

Now, connect these to the board as such

sIRsGrlXgYDiaeISfAlgP2Q

So it should now look like this:

photo
The LED strip requires a bit more power than the onboard power supply can handle, so we will use a dedicated power supply for both this and the LED dot matrix. As per adafruit, use the following equations to estimate how much amperage you need:

lower limit for minimum Amps = number of pixels *20 mA1000
upper limit for minimum Amps = number of pixels *60 mA1000

For our, case we have:

lower limit for minimum Amps = 60*20 mA1000=1.2 Amps
upper limit for minimum Amps = 60*20 mA1000=3.6 Amps

So we need 5 volts and anywhere from 1.2 amps to 3.6 amps. Good news is that we have a power supply of 5 volts and 10 amps. (Don’t worry that we have 10 amps. The LEDs will only take as much current as they need. It would be a voltage higher than 5 that could damage them.)

 

LED Dot Matrix

Flip the dot matrix over to have a look at it. There will be a few in and out pins, but we only need two for this tutorial – logic and power. The other is for hooking up tandem dot matrices.

sgpGPCYWYTNWvXTZXnvtb3A
First, we’ll setup the logic wiring for the dot matrix. You should have a grey cable with many holes to insert wires into. It looks like this:

sTgnVishZSgRW-pr7jRu2iA
Each one of these holes corresponds to some portion of the logic that will make the dot matrix display and light up in different patterns -the amount of red/green/blue in a pixel, the timing, etc.

Using the red strip on the grey cable as a guide and always keeping it on our left hand-side, here is what each hole does and where it will wire on the Spark Core:

sm6N-Aqc8e-C3rHN7xAfUQg

Inserting the wires into their respective slots, it will look like this:

photo (2)

I suggest wrapping this piece in electrical tape to avoid any unintentional pulling and loosening of wires.

Now that we have all of the logic wires in place, let’s hook them up to the Spark Core on the breadboard. Here is the updated diagram from before:

sWQ25NppRMH8jIN7tRWJ9Tg

Here is what it will look like in person:

photo (3)
Now, connect the other end of the grey cable into the the back of the dot matrix in the port that says “IN”.

photo (4)
Connect the power cable into the back of the dot matrix and plug it into the breadboard. Here is what it will look like and updated wiring diagram for this:

seBR0ZKOh9IoDarqiWrhanA
sZ1L5X4EE1AeL7UYN2DS_Gg

Powering

Let there be power! (Note: during this portion, leave the power supply unplugged when wiring to the Spark Core)

photo (6)The LEDs and the LED dot matrix require their own power supply. Because of this, we will use a 5 volt 10 amp power supply. In order for this to play nicely with our Spark Core and other components on the breadboard, we’ll use a female DC Power adapter.

 

photo (7)Plug the adapter into the output of the power supply, insert one wire into the positive terminal and another into the negative terminal. Tighten the screws on top with the “mini”ish screwdriver to keep them in place. I also recommend wrapping this junction in electrical tape if possible, to avoid unintentional wire pulls.

 

Plug the positive wire (red) into the “+” on the breadboard, and the ground wire (black) into the “-” on the breadboard.

IMG_1644

In order to protect the LED strip, we will connect a capacitor across the “+” and “-” on the breadboard. When doing this, have the long wire coming out of the capacitor in the “-” and the short wire into the “+”.

IMG_1645
To tie everything together so that all of the components – Spark Core, LEDs, dot matrix – are on the same page, let’ connect the Spark Core’s ground to the “-” strip. The resulting wiring diagram is now:

Email Controlled Christmas Tree

The wiring should be all ready to go. You can plug it in at this time, but don’t expect anything to happen just yet because we haven’t uploaded any firmware to the Spark Core.

 

The breadboard – solderless vs permanent PCB

I would recommend prototyping and testing on a solderless breadboard first. Once you know the wiring is correct, I would move it over to a more permanent PCB (printed circuit board). The reason I say this is because these are lights on a Christmas tree, and such decorations always present a fire hazard. To take extra precaution, solder it and apply electrical tape to all exposed wires before placing everything on your tree.

 

Uploading the Firmware

If you haven’t done so already, go ahead and clone the Github repository to your computer. To do so, open your terminal, navigate to where you want to store this project, and use the following command to make a copy of the project onto your computer:

git clone https://github.com/tylernappy/email_controlled_christmas_tree.git

Open up the project in your favorite text editor (sublime, atom) and open the file – tree.ino – which contains the firmware (aka software) for the Spark Core. The easiest way to upload it to the Spark Core is to create a new app on the Spark Core’s online IDE, copy the code from tree.ino, and paste it in there, otherwise, you can use their IDE based on the atom text editor. Then, hit the “lightning” icon to upload the firmware. On the screen, it should say at the bottom – something along the lines “uploading code, please wait.”

sD7kOXmuXCdMQtuqBeYYfmQ
If for whatever reason an error pops up saying there is a library that isn’t included, you can go in and add them manually by clicking the libraries icon, searching for the SparkIntervalTimer library and the Adafruit_mfGFX library and click “INCLUDE IN APP”.

s_ThprnpO6HX3c6w0P3ym4g
s45SYCnlLS-mU4_QDCKPVtw
I have written the firmware to turn the lights and matrix on when the Spark Core starts up. If you see this happen, the Spark Core firmware has been uploaded correctly.

 

Web Server

To start off, we will host the web server on your local computer for testing purposes. Once all of kinks are worked out, we will push it up to Heroku where your app will live in the ether of the internet!

Since you already have the Github repository cloned on your computer, go ahead and open up a new tab in your terminal, and “cd” in to the Rails server that came with it using the following command:

cd christmas_tree_server

Now, run the following command to run a local server:

rails server

At the moment, only you can access this web server from your computer. This won’t work for us, seeing as we need Mailjet’s Parse API to access your computer. To solve this, we’re going to open up your computer through local tunneling via a service called ngrok (if you don’t already have this set up, go to their site, download, and acquaint yourself with the service).

Open up another another tab in your terminal, “cd” to where you downloaded ngrok, and use the following command to open a local tunnel on your computer to port 3000, which the Rails server defaults to:

./ngrok 3000

You will see the following screen – this is the URL to access your server:

szWfOTmBLtDElhQnXXmBNkg
For this particular case, the server is at http://3cbc1861.ngrok.com. Write yours down as you will need it when setting up Mailjet’s Parse API. For the rest of this tutorial, I will use http://3cbc1861.ngrok.com as the server URL but remember to use what ngrok gives you, otherwise Mailjet will deliver the emails to the wrong URL! Specifically, we have the web server accepting POST requests from the http://3cbc1861.ngrok.com/email_processor endpoint. If at any point you wish change the logic in the web server before the information is delivered to the Spark Core, you will find that in app/controllers/change_lights_controllers.rb.

 

Pushing up to Heroku

If you have already gone through this tutorial and everything is working nicely, you’re going to want to host the web server in the cloud rather than on your computer. To do this, we can push our Rails server up to a service called Heroku – a web hosting service. If you don’t already have a Heroku account, I would sign up and acquaint yourself with the service. It’s pretty awesome and free.

Once this is up and running, remember to update the URL in your instance of Mailjet’s Parse API to whatever the URL is of your Heroku app.

 

Mailjet’s Parse API

First thing’s first, we need to find your API Key and Secret Key for your Mailjet account (if you haven’t already done so, sign up for Mailjet here).

sNOfTtpzV9Bd4S5H2-phsRw
You will find them here under “configure my SMTP” on the main dashboard. Keep these secret, otherwise someone can send emails on your behalf!

Now, we’re going to create an instance of the Parse API using a curl request. In terminal, paste the following, then hit enter. Remember to substitute “API_KEY” and “SECRET_KEY” with your respective credentials and http://your.webhook.com with the server URL ngrok (or Heroku) returned back to you:

curl —user "API_KEY:SECRET_KEY"
https://api.mailjet.com/v3/REST/parseroute -H 'Content-Type: application/json' -d
'{"Url":"http://your.webhook.com/email_processor"}'

This command will create an instance and return back to you something like this:

{ "Count" : 1, "Data" : [{ "APIKeyID" : 123456, "Email" :
"christmas-tree-app@parse-in1.mailjet.com", "ID" : 12, "Url" :
"http:\/\/47c528d4.ngrok.com\/email_processor" }], "Total" : 1 }

The email returned back to you – in this case, christmas-tree-app@parse-in1.mailjet.com – is the email that when sent to, will dump all of the email contents onto your web server via a POST request. If you wish to update this email address to something a bit more aesthetic, use this command:

curl -s -X —user "API_KEY:SECRET_KEY"
https://api.mailjet.com/v3/REST/parseroute -H 'Content-Type:
application/json' -d
'{"Email":"whatever-you-like@parse-in1.mailjet.com"}'

 

Decorating the tree

Now that you have all of the the hardware wired, all the firmware uploaded, and the server up and running, it’s time to decorate the tree! From my experience, the best way to do this is to put the dot matrix at the top of the tree first and then wrap the LEDs around the tree going from top to bottom.

To mount the dot matrix at the top of the tree, I screwed in the four magnets to the back (these came with the dot matrix) , then placed the rubber band onto one of the sides, twisted the rubber band a half turn, then put the other side of the rubber band on the other side of the dot matrix – essentially creating an “X” with the rubber band that effectively mounts it to the tree.

s9-WkUi511Wz4N_C_xIK38A

Here is what it will look like once you’re done!

IMG_1652

Changing the lights via email

At the moment in the Github repo code, you can email up to three commands by putting them in the body of the email. The three commands are “lights”, “background”, and “icon”.

Below is a list of all currently available options for each of the commands.

lights
“lights” changes the color and pattern of the lights around the tree.

  • blue
  • green
  • red
  • christmas
  • mailjet

background
“background” changes the background color of the display on top of tree.

  • blue
  • green
  • red
  • black

icon
“icon” changes the icon on the display on top of the tree.

  • circle
  • mailjet
  • star
  • logo

 

Example Email

The following example will change the lights blue, put a star on the display, and make the background color of the display green. Remember to change the email address you are sending to the one you have have associated with Mailjet’s Parse API:

email-example

El Fin

And that’s it! Enjoy your email controlled Christmas tree!

If you see any bugs or wish to add more light patterns, dot matrix icons colors and icons, send me a pull request or email me at tyler@mailjet.com.

 

Thanks to Big Brothers Big Sisters

We’re excited to say that Big Brothers Big Sisters of NYC will be taking control over the Email Controlled Christmas Tree. For those of you who don’t know who they are:

Big Brothers Big Sisters of NYC serves over 3500 children finding them mentors to help ensure their success in life. We do this by partnering with families, volunteers, companies and the community to inspire a positive change in all. Visit www.bigsnyc.org to learn more about becoming a BIG or to donate towards our Education Initiative.

Help light up the holidays by donating to Big Brothers Big Sisters: http://www.bigsnyc.org/donate

 

Want to define your email strategy to win customers over this holiday season? Check out Mailjet’s Ultimate Guide To Holiday Emailing.

Holiday Emailing Guide

 

WiPi changing up The Internet of Things at HackCC

Just wanted to give a quick shoutout to team Node WiPi from HackCC this past weekend.  Not only did they win Mailjet’s API prize, but they also took home the gold for the overall competition.

 

WiPi changing up The Internet of Things at HackCC1

Node WiPi, inspired by one of the team member’s brother’s basement flood incident,, is an inexpensive sensor monitor (moisture, light, heat, etc) for  the home.
Using an array of Arduinos, sensors, a handful of inexpensive radio sensors, and their computer as a server, they were able to rig up a network of monitoring stations that would record pertinent data around the clock.  Home owners can then, utilizing Mailjet’s Parse API, send an email to the system to check the status of different sensors.  Upon receiving the email, the system, utilizing Mailjet’s Send API, sends an email reply detailing the status of each sensor (check out an example below).  The cool part here is that each box changes color depending on its status.

WiPi changing up The Internet of Things at HackCC2

WiPi is an excellent addition to the Internet Of Things.  I’m excited to see more projects like this at future hackathons. I’ll be sure, as should most of you, to be on the lookout for updates to come from WiPi on this project!
In the meantime, check out some of their project on github.

 

Want to learn more about our Parse API?  Check out this deck about use cases and how to implement!

Hacking with MLH at HackNC

Last Monday, I got back from North Carolina where I was at HackNC, Major League Hacking’s UNC event.  It was a weekend filled with late nights, a bunch of video games, some delicious, snacks, and lot of programming.
HackNC was different from previous hackathons that I’ve attended, in that all of the hackers were college students. Most of these developers were self-taught or picked up coding in class, but they proved to be rockstar hackers at this event! We saw great, creative usage of the Mailjet APIs that I’d like to recap and give a shoutout to each of the teams. There were so many and all of them were executed extremely well.  So, here goes…

 

Boxwich

Boxwich ended up taking home Mailjet’s prize — some Chromebooks — for best use of our API and also an overall 3rd place title for the hackathon.

Hacking with MLH at HackNC

At first glance, this team created a very ordinary looking box, but there are a few bells and whistles to it.  There’s a large failsafe switch to arm and a button to activate.  (To the left is a picture of Boxwich.
Let me give you a play by play as to what this thing does: you’re hungry and don’t feel like calling up and ordering your favorite sandwich from Jimmy Johns; enter Boxwich.  You flip the lid for the arming switch; flick the switch up to arm it; then, push the button.  In about 20 minutes, a delivery man will be ringing your doorbell, holding a delicious sandwich from Jimmy Johns.  No talking, no debating what to get, just flip, flick, and push — that’s all it takes.
So how did they use Mailjet?  After pressing the button, an email is sent to the orderer confirming the order, saying how much it costs, and how long it will take.  This is important, because you bet your teeth that I would want to make sure my flicking and pushing wasn’t all for nothing.

In the spirit of the hackathon, the team reverse engineered Jimmy Johns’ private API, coupled this with a Raspberry PI, and presto!  A box that orders sandwiches with the push of a button.

Google Hangou

This team created a chrome extension that listens to full sentences said during a Google hangout and translates them.  After the hangout is over, the entire translated script of the conversation is sent to the participants.  This is useful for non-native speakers in business scenarios — it allows them to review moments they missed or misunderstood.

Don’t Unplug Me

Ever leave your computer charging somewhere to come back to find out that some nincompoop stole your outlet?  They were even quick enough to leave before you got back!  Well, their day of reckoning has come.  With ‘Don’t Unplug Me’, you can catch the jerk in the act.  Here’s how you do it:

Find a sweet spot to plug your computer in; go to ‘Don’t Unplug Me’s site, press “Go”, and then leave your computer to charge while you do whatever it is you must.  When someone tries to jack your outlet and unplugs your computer, the camera will automatically take a picture and email this mug shot to your inbox (via Mailjet) and your phone (via Twilio).  Then, you bring this photo to the police and bring the culprit to justice (kidding).

Objective Fashion

Armed with Mailjet and some weather APIs, this app takes the hassle of having to chose your outfit out each day.  ‘Objective Fashion’ checks the weather, checks the items of clothes you have uploaded to the app, and then gives you an outfit recommendation based on the ambient weather so that not only will you look cool and dope, but you’ll also be properly fitted  for the appropriate weather.

Runaway

Have you ever wanted to just get in your car and road trip to wherever?  This application allows you to input how much money you have, the kind of car you drive, where you live, the number of people you are traveling with, and it will calculate a Google map route of how far you can go — taking into account your car’s average MPG and in turn how much gas will cost.  Best part is that if you’re not digging your current route, you can keep choosing until you find one you one until you like.  An email of the itinerary is then sent to you using Mailjet, and off you go to runway!

 

Raptor Visualization

 

This team created a virtual dashboard for EMC’s Raptor machinery, accessible through the browser.  If anything were to go wrong, an email is sent via Mailjet to the observer (via Mailjet) notifying them of error.  This is very useful on the off chance you’re not on the dashboard — you’ll still receive real-time notifications when and if something goes wrong.

 

Open Course U

 

Gone are days of having to search for particular subjects across each of the major free learning platforms individually — MIT, Stanford, Coursera, Khan Academy.  Open Course U’s site acts as a consolidated search engine; simply select the course you want to study and you’ll be shown links to all of the sources the course is hosted on across the Internet.

Send Email With MATLAB

MATLAB is a very powerful engineering tool for simulations and computations.  For those who use it – and use it extensively – you know the power that it can offer and basically how awesome it is.

So, how do you send email through MATLAB?  Here is a code snippet utilizing their built in ‘sendmail’ function:

For the above code to work properly, first thing’s first — sign up for a Mailjet account here to access Mailjet’s SMTP server.  After signing up and verifying yourself, head over to your SMTP settings.  Here, you will find your username (api key) and your password (secret key) which you input into ‘my_username’ and ‘my_password’, respectively.  Lastly, change ‘my_default_email_address’ to the email address tied to your existing Mailjet account (if you just signed up, use the one you signed up with).
And that’s that!  Customize the email recipient, the subject line, and the body of the email in the ‘sendmail’ function.

P.S. If you wish to use something other than Mailjet, you can use any SMTP service – Gmail, Hotmail, Yahoo, etc.  Just fill in the aforementioned settings with the appropriate values from the SMTP service you wish to use.

 

 

 

 

Hacking Pediatrics: a weekend of enhancing pediatrics

Emailing + Healthcare ?  “Will this work?”, I thought.   Would hackathon participants successfully incorporate email into projects mostly hardware and mechanical based, sprinkled with a slew of government laws regulating communication in hospitals?  There was only one way to find out…

I just got back from Bean Town this weekend where Mailjet sponsored a hackathon called Hacking Pediatrics . Brought to you by many familiar names — some of which include Boston Hacking Pediatrics- a weekend of enhancing pediatrics1Children’s Hospital, MIT, Microsoft — the hackathon recruited participants from all walks of life.  This diverse and extremely bright pool of hackers lead the way for a weekend of some pretty awesome hacks.

 

 

 

 

The event kicked off with introductions and the itinerary for the weekend.  Then, it was time for the group to discuss which ideas they wished to hack on over the weekend.  After this was all said and done, teams formed consisting of doctors, nurses, biomedical engineers, developers; this diverse mix of teammates offered the groups great perspective and synergy that lasted throughout the event.

 

Hacking ended and presentations were gHacking Pediatrics- a weekend of enhancing pediatrics2iven — we saw a  wide range of solutions for a slew of different issues seen in the pediatrics field.  On top of it all, teams used a variety of programming languages: some for iOS, others used Rails, and one team even used MATLAB — (a la wikipedia) “is a multi-paradigm numerical computing environment and fourth-generation programming language.”  Basically, it’s pretty awesome for simulations and other engineering computations — for Mailjet!

Some of the teams that used Mailjet astoundingly:

BreathSMART:
Using a 3-D printed shell, an Arduino, a button, and BLE, this group created a connected device that mounts to a child’s inhaler and monitors the number of puffs administered.  If the child takes too many doses, it is potentially lethal to him or her and this is obviously a tremendous concern.  Enter Mailjet.
If a child has taken one too many puffs of his medication, the device’s iOS app automatically sends an alert to inform the parent so they may be able to take the appropriate action.

 

Crazy Moves:
Armed with an Xbox Kinect and MATLAB, this group gamified children’s physical therapy.  The user stands in front of the screen and the Kinect.  A friendly cartoon avatar (like an octopus, or other friendly sea creature) is then guided through a maze by the motions of the user, resulting in both a fun video game experience and a physical therapy session.
After completing the session, parents receive an email from Mailjet summarizing their child’s session and progress thus far.

 

 

Hacking Pediatrics- a weekend of enhancing pediatrics3

 

 

Transition:

Team Transition eased the burden of kids entering the real world of taking their nebulizer — (a la wikipedia) “is a drug delivery device used to administer medication in the form of a mist inhaled into the lungs” — medication.  Strapped onto an ordinary nebulizer is a sensor that detects whether or not the mechanism is on; thus, treatment is in session.  On the backend, there is an application that links to both the parents’ and child’s bank account.  If the sensor detects the child has taken his nebulizer treatment, a certain allotted amount of money — much like an allowance — is transferred from their parent’s account to theirs, incentivizing the child to continue their treatments.

After all was said and done, team Crazy Moves took home the Mailjet grand prize of Chromebooks!

Thanks for having us, Hacking Pediatrics, and I look forward to next year’s event!

Endnote: It was nice — I hadn’t been to Boston in two years, and having gone to school there, it was nice to be back up.  When I had some free time, I went back to BU’s campus, which has apparently had a lot of upgrades, and walked along the Charles River (If you’ve been to Boston and haven’t done this, you are missing out — very relaxing, especially during this time of year).

Tyler

 

Soho House x 3beards Hackathon: My Climb for the Silver

For those of you who do not know the Soho House, it is a prestigious country club-like-establishment where members have the luxury of fine dining, cool meetups, and a sweet rooftop pool.  As if these amenities in themselves weren’t cool enough, Soho House  joined up with the guys from 3beards to put on a bougie hackathon this past weekend. I had the honor of being invited to participate in the event.

As per the usual routine with most hackathons, teams were given the usual 24 hours to complete their hacks. The twist was that they had to convert data into New York themed art.  When the “games” began, I teamed up with my buddy Justin from the Startup Institute.

Our idea: ever since the birth of the stock market, traders and investors could only see how their portfolio was doing.  We wanted to change this. Investors should be able to hear how their investments are doing, like a beautiful symphony of dollar signs!  The idea was,  if your stocks are doing well, they would play a harmonious tune and if your stocks are doing bad, they would sound like a soundtrack out of a horror film.
With Justin sporting his music and front end development skills and me rocking the front and back end game, we set off for the gold.

As we hacked our hearts out, we also dined on meals some of the best food I’ve ever had at a hackathon.  It truly was like eating at a five star restaurant – delicious salmon, paninis, coconut water; the list goes on and on.
When the countdown struck zero, it was time for each team to present their ideas. The judges went to deliberate, and we were escorted to room to await the final decision. The open bar looked like something straight out of The Matrix, specifically the scene where Morpheus asks Neo to choose to take either the blue pill or the red pill.
Soho House x 3beards Hackathon- My Climb for the Silver

 

Third place went to a team who developed an application that allowed users to take pictures and overlay them one on top of the other to form superimposed photos. Second place went to me and Justin for our app which, as previously mentioned, converts a stock’s performance into audio. Check out our app here and let me know what you think! First place went to team ChillZone who developed an “anti-Foursquare”.  Their app looks at NYC Facebook checkins and determines if certain spots are crowded or not.  Less crowded spots are deemed “chill-zones” to go to and, well, just chill.
There were many awesome ideas and, as the British often practices (3beards is a British company), everybody got a prize in the end!  I walked away with some sweet Ten shades (pictured above). Thanks for a great time Soho House and 3beards!

 

Wrapping up a month of APIs: API Strat & Practice

By Tyler Nappy

I just wrapped up an API heavy month, with our last stop in Chicago where we sponsored the API Strategy & Practice Conference.  It was three days of great talks, cool goodies, and a hackathon unlike anything I’ve experienced before.

Wrapping up a month of APIs- API Strat & Practice
 

While your typical hackathon is an intense weekend of coding and building one idea or MVP, API Strat’s speed hack was just as the name suggests, about speed. Teams were presented with a series of timed API challenges – over the course of 3 hours, sponsors would throw out various problems to solve. The best part was that teams could earn extra points from other acts of creativity and bravery, including dressing up in costumes and performing API-themed songs.

I had the pleasure hearing a remix of “Ice, Ice, Baby” that incorporated API-themed references in place of Vanilla Ice’s eloquent lyrics.  Another participant went on stage, busted out a ukulele and performed another great API themed song.  It was a very refreshing take on APIs, a great time for the judges and contestants alike.

While there, I also gave a talk on email parsing and how to integrate it into your app.  Some other great talks included Twilio with a live coding session on a new MMS feature they had just rolled out — I have to say, it’s pretty awesome. Our friends at Traitify also presented on how users can benefit from using their API,  a Myers-Briggs test only API’ified.  There were so many more great, informative presentations – the list goes on.

In utmost conclusion – it was a blast meeting everyone at API Strat. Thanks for the great time, Chicago! We’ll be back in the area in late November for WildHacks.  Very much looking forward to being back in the area! Let us know if you’ll be around.