Day 30: Entrepreneurial superpower

Nick Ang
getting technical
Published in
6 min readJul 31, 2016
Elon Musk. Image: The Telegraph

Woke up today to the news of Elon Musk’s Tesla Gigafactory launch. It’s something I’ve heard on and off over the last few years and a lot this past week, and now it has finally come to fruition. I relied on a bootleg recording of the event from Facebook to get a quick feel for the event. There was palpable excitement in the room as Musk talked in his signature starts and stops. As of today, only 14 percent of the factory is complete, but it is already the production floor of Tesla’s home wall battery packs that store the juice from residential solar panels.

Also in the wind was something about a merger with SolarCity, one of the (if not the) biggest solar panel installers in the US, which also ‘so happens’ to be a company for which Musk is the chairman. I’m not sure what everybody thinks about an electric car company merging with a solar energy company, but I think it’s one of the coolest (and hardest to pull off) things I’ve ever heard in business.

So that’s Elon Musk making the headlines, again. He and his team are doing amazing work. What they are doing is almost un-one-uppable in the business world, and at least to me, just as important as what governments around the world are doing day to day. Tesla and SolarCity have my best wishes in their quest to revolutionise energy, transportation, and the way we live.

Tesla Model 3 prototype. Image: Motortrend.

Back on earth

Elon Musk is poster child for sky-is-the-limit entrepreneurship in Silicon Valley but also the whole world. Seeing him overcome one seemingly uncrossable obstacle after another feels surreal, as if he has some untold super power.

As someone who believes in the power of a company to bring about change (Uber, Airbnb, Facebook, YouTube, Tesla, Google all come to mind), I’ve often wondered what I can do to get halfway to where Elon Musk and his companies are currently at. He has super powers, I don’t doubt it, and so my aim is not that high. But as an entrepreneur I aspire in his direction and will be happy to get close. Humanity, after all, has big fishes to fry inside and beyond the sea of energy and transport, and I want to fry big fish.

To figure out what a normal person like me can do to live a seemingly-superhuman business life, I’ll need answers to a few questions:

  • How much technical knowledge and skill do extremely successful entrepreneurs have when they started working on their winning business?
  • At the point the company was started, was there fierce competition, some competition, or an open ocean? (In Peter Thiel speak, was it a “zero to one” company, or a “one to n” company?)
  • How many times have they failed before landing on their first success?
  • What is one main thing that they attribute their success to? Which answer shows up the most across the spectrum?
  • What was his/her personal financial situation like before the first success? Rich, average, or in-debt? (This stems from my observation that when hard-pressed, many entrepreneurs unleash an awesome creative force.)

If I’m able to gather answers from a big enough sample size of very successful entrepreneurs, I’d be able to recreate as much as possible the personal and environmental conditions from which their success was spawned, and with a bit of luck, raise my latent potential to create a meaningful and sustainable business.

Sounds like a lot of work to me. I think I’m going to first try to find out if someone else has done parts or most of the work and so graciously shared their findings on the web. Maybe a podcast somewhere.

Project ICU update

In other news, I finally found a viable solution to stream video from a Raspberry Pi 3 with an attached pi camera module to a remote display. I tested this with the Pi placed near the main entrance of my apartment and a remote display powered by a Remix Android PC (though any old smartphone would also work) in my home office about 30m away, and it worked.

VLC was the solution that worked in the end.

VLC needs to be installed in the Pi and the smartphone that is supposed to be the remote display. To install VLC to the Pi:

sudo apt-get install vlc

And to install VLC to an Android smartphone, go to the Play Store and download and install the app.

Once the software are installed on both devices, only two steps remain, one for each device.

Step 1 is to enter this command into Terminal (the command-line interface of Raspberry Pi):

raspivid -o — -t 99999 -hf -w 640 -h 360 -fps 25|cvlc -vvv stream:///dev/stdin — sout ‘#standard{access=http,mux=ts,dst=:8090}’ :demux=h264

In plain English, this command means “using the in-built ’raspivid’ module which controls the Pi Camera video mode, start to stream video at 640 x 360 resolution and 25 frames per second, horizontally flip the stream, stream for 99999 milliseconds (99.9 seconds), and finally give a standard output to port 8090”.

When this is entered into the Pi’s command line Terminal, a slew of console messages will load. It will look as though the Matrix is about to load.

Step 2, on the Android smartphone / remote display, launch the VLC app and tap on the ‘Network stream’ button. There, I entered the IP address of my Pi (every device connected to your home Wifi will have a dedicated IP address that you can find out by typing ‘ifconfig’ into its command line interface) in this format:

http://<ip_address>:<port_number> (template)

http:// 192.168.1.102:8090 (actual)

Et voila! The video stream appeared in the VLC app on my remote display. It has a short lag (aka ‘latency’) of 1–2 seconds, which isn’t a big problem for most home security applications.

What is happening in the background is the Pi processes the video stream coming in from the Pi Camera, encoding it in raw .h264 format, and sends that output to port 8090 of its wireless LAN address, and the wireless router sends that information to my Remix Android PC (which is also connected to the same Wifi network) and VLC processes it and pumps out the video as a stream in its media player interface.

In process flow: Pi camera raw footage → Pi computer receives and encodes in .h264 format → output to port 8090 → video datastream journeys wirelessly via Wifi network of router → VLC app running on Android PC fetches data from port 8090 of Pi’s IP via router → VLC processes and displays video stream.

Even shorter explanation: Pi gets footage and constantly sends video datastream → Router → VLC on Android PC picks up and renders video on display.

Figuring this out by myself took about 4 days. I exhausted many different options (see previous posts) before arriving on one that worked. Again, the most amazing part is that VLC is open source software, free for anyone to use on their computer.

From here, I have only the Python script left to write, but another technical hurdle once again stands before me. The Pi Camera cannot take a still image while it streams video, but I need it to whenever someone is at the door and presses the doorbell.

At this point I don’t know enough about Python to know whether the solution can be just a few lines of code (to stop video stream and snap a still image when button is pressed, and restart the stream immediately after that). I’ll find out and post another update soon.

One last thing…

Tomorrow is the last day of July! That means my 30-day challenge is coming to a wonderful end. For once I’ve kept my promise to write every single day. I’ll reflect on the mini achievement tomorrow and share some of my thoughts going forward.

This post is part of my 30-day commitment to write about my journey learning technical stuff.

Posts can be found on the Medium publication, Getting Technical.

--

--

Nick Ang
getting technical

Software Engineer. Dad, rock climber, writer, something something. Big on learning everyday.