Posted on 08 March 2020

View this post on Instagram

A post shared by Jimmy Xiao (@jimmyjxiao) on

Making RGB LED projects that pull from REST APIs easier

Posted on 30 November 2019

Project Github Link

This is a framework I wrote that helps you create solutions that use a lot of RGB LEDs that are used to indicate statuses of various things pulled from web APIs. It’s written for ESP8266, but I don’t imagine it would be especially hard to adapt to other microcontroller platforms, especially if they’re arduino based. It’s got some nice abstraction logic to help handle multiple port expanders (MCP23017) and addressable LEDs (WS2812). I wrote it initially for this project.

read more

Map with weather of airports around the country

Posted on 29 November 2019

Pictures are worth 1000 words, so here’s what I’m talking about:

I have a friend who’s a private pilot, and bought a map with a bunch of airports and airspace stuff on it (actually two of them on accident). I decided to work with him to put RGB LEDs in various airports to indicate flying conditions in real time. Apparently, these are called METARs, which to save you a search because I had no idea what it meant either, stands for METeorological Aerodrome Reports. We used the API from the Aviation Weather Service from NOAA, which returns the information in XML, which we parsed with TinyXML2.

Since it would be making web requests, an ESP8266 seemed like the logical choice for the platform that controls all of this. A similar project online used a Raspberry Pi, but in my opinion, that’s overkill and more expensive that it needs to be (we’re both college students, cheap = good). We bought the ESP-01 tiny version of it at first, which worked, but using an Arduino to interface with it and dealing with the associated voltage conversions and holding certain pins low to flash and what not was incredibly frustrating so I ended up getting a NodeMCU instead. Much easier to work with.

We pasted the map onto a giant foam board we found with glue, then drilled holes for LEDs. My initial solution had a common annode LED for each of the 20 airports we planned to do, but my friend thought 60 wires running back to the breadboard (3 for each LED) was excessive. I don’t want to admit it, but he’s probably right; it would’ve been a giant pain to wire up. Instead, we got these addressable LEDs. These are pretty nice, I have two rails of 5V and GND that all the LEDs could connect in parallel to, and then they just get daisy chained up to each other through the data pins. The code used is all here.

Since the initial solution involved using a bunch of non-addressable LEDs, and we ended up using the WS2812 based LEDs, I made a framework that simplifies projects that use a lot of RGB LEDs and pull from REST APIs using the ESP8266. Check it out!.

Some the airports were chosen based on sentimental reasons and others just to get a picture of what’s happening around the country. If anyone’s curious here are the airports we did: BOS,​JFK​,PHL​,DCA​,RDU​,ATL​,MSY​,DFW​,MCI​,ORD​,OSH​,DEN​,SLC​,BZN​,SEA​,SFO​,LAX​,CLT

Using LightGallery in Jekyll without tedious configs

Posted on 28 July 2019

I don’t do webdev often, but lately there’s been a small spurt of most of the my projects being websites. Photo galleries and albums are an extremely common thing on websites, and I would assume quite a few have wrestled with yamls describing the file path, name, and caption if they’re trying to do it in Jekyll. Today, I’m going to show you how to configure jekyll to use all files in a folder that’s passed in as an argument. Once it’s set up, all you need to do to create a new album is create a folder, throw your pictures in, and then:

{% include album.html albumname="myAlbumName" %}

You can see the resulting album here: example

read more

The Case For Traveling Alone

Posted on 27 July 2019

And by “travel”, I don’t necessarily mean hopping on some expensive flight and staying at a luxury resort. In my experience, so many people haven’t explored the places they live and work at, and often miss the gems around them that other people take a long trip to see! So by “travel” I simply mean to explore and do things: go on a hike, out to eat, to a concert, with or without somebody to do it with.

In the past year, I’ve had a lot of opportunities to explore places alone, from a long layover to taking extra days at the tail end of a college department organized service trip, to excursions and nights out alone in Houston, where I spent the summer and had few connections. Don’t get me wrong, I love traveling and exploring with other people too, and that has its benefits that are unique from the experience when rolling solo. However, through these opportunities, I’ve had awesome experiences that I wouldn’t have been matched if I were with somebody.

From walking over 30 blocks in San Francisco instead of taking BART just because it was a good day and I wanted to take it all in, to a spontaneous decision to rent a kayak in Austin, being on your own allows you to explore with no compromises (except with your wallet!) about what you want to do. And with all that time you spend thinking about others and what they do or don’t want to do, I think it’s important to take some time and just do what you want to. What I’ve also learned is nobody cares if you’re eating out, going to a concert, or doing anything else alone. As Tom and Donna in Parks and Rec put it, “treat yo self”. It’s during those 6 mile hikes, the gaps between artists at a concert, rental-bike rides at iconic monuments, and amazing dining experiences I enjoyed alone this year that I felt like I grew the most this year. Here are some random pictures from my solo adventures:

Spring Break

Posted on 16 March 2019

For Spring Break, I participated in Duke Energy Initiative’s solar spring break program. Through this, I got to help install solar panels with Grid Alternatives in Salinas, CA. They were super friendly and showed us the various steps in the process, such as siting, dealing with regulations and codes, efficiency considerations, etc as well as letting us gain some hands on experience installing solar panels.

We stayed in a hostel in Monterey, CA which was a pretty cool experience. It’s really an awesome city, and going on runs along its coastline was amazing. I also got to spend my last day in California exploring San Francisco. I decided to walk all the way from 6th st | Market St to Pier 39 and then along the Embarcadero, which was a lot of walking but definitely worth it. Then I biked across the golden gate bridge, took BART back and almost missed my flight