Skip to content

Instantly share code, notes, and snippets.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@arkival
arkival / intel-edison-cmdline.md
Last active March 21, 2018 00:31
C/C++ cross compilation from the command line for the Intel Edison

C/C++ cross compilation from the command line for the Intel Edison

It is not necessary to use the Eclipse environment in order to compile code for the Intel Edison. Command line compilation is possible on all platforms and is relatively straightforward. For linux and OS/X the simplest method is to download the SDK for the respective platform and setup as described below. Although Intel lists SDKs for both 32 and 64 bit Windows, I find it simpler to setup command line compilation from the integrated IOT platform installation.

All three platforms use the GNU compiler tools (gcc, g++, and friends) and the main differences really come down to differences in the command shell usage. Consequently, the procedures have the following common elements.

  1. Install the cross compilation tool chain and library file-system.
  2. Setup the path so that the operating system can find the compilers and other utilities.
  3. Setup environment variables to simplify the command line and tell the compilers where to find librari
@arkival
arkival / movingfiles.md
Last active May 6, 2020 09:53
Getting your code onto the Intel Edison

Getting your code onto the Intel Edison

All of the integrated environments of the Intel Edison will copy your executable from your development PC to the Intel Edison. If you want to develop outside of these environments, however, you will have to copy the code over yourself. Here are several solutions that don't involve creating a custom flash image.

This gist assumes that you are able to, at minimum, access the Edison console through USB. Some methods require additional connectivity. There are two basic approaches. Network methods are for when you have access to Edison over wifi, and the sneaker net methods are for when you don't.

Network Methods

If you have wifi configured, there are other ways of getting your files onto the Edison. None of these methods require the installation of any other software onto the Edison. If you can SSH into the Edison over wifi, then these methods will work.

@arkival
arkival / javaTime.md
Last active February 20, 2018 02:44

Easy timestamps with java.time

Java 8 introduced the java.time package which makes short work of creating and parsing timestamps.

To create a String representation of a timestamp we can use LocalDateTime.now().toString(), e.g.

String ts = LocalDateTime.now().toString()

To convert the string back into a time object we can use the parse method of LocalDateTime, e.g.