Skip to content

Instantly share code, notes, and snippets.

View terrillmoore's full-sized avatar

Terry Moore terrillmoore

View GitHub Profile
@terrillmoore
terrillmoore / decode-0x14.js
Last active July 19, 2017 19:52
Description, and Node-RED decoding function, for Catena 4450 data record port 1, type 0x14
// this Node-RED decoding function decodes the record sent by the Catena 4450 M101 power monitor
// written in a big hurry, so no points for style
var b = msg.payload; // pick up data for convenience; just saves typing.
// an empty table to which we'll add result fields:
//
// result.vBat: the battery voltage (if present)
// result.vBus: the USB charger voltage (if provided)
// result.boot: the system boot counter, modulo 256
@terrillmoore
terrillmoore / RTXv5-Blinky+UART.md
Last active January 22, 2017 04:13
Keil RTXv5 (API v2) MCB18xx / LPC18xx RTX-Blinky + UART example

Convert RTX-Blinky from RTXv4 to RTXv5, and add UART Example

There is no example for using a UART in conjunction with RTXv5 as of this writing. This gist presents an adapted example that was tested in conjunction with Keil V5, RTX APIv2 and the Blinky example.

Create the project

Create the RTX_Blinky project in a spare directory using the "Pack Installer" button.

  1. Press the pack installer buttong.
  2. In the left panel, select Boards and select MCB1800>Devices>LPC1857.
  3. In the right panel, select Examples, and then "CMSIS-RTOS Blinky (MCB1800)". Press the [Copy] button.
  4. Select someplace to put the files. The Keil IDE will create subdirectories from this directory. Avoid using an existing location!
@terrillmoore
terrillmoore / OpenSSL-1_1_0-stable-VS2015.md
Last active October 28, 2022 00:38
Building OpenSSL 1.1.0 with Microsoft VS 2015

Building OpenSSL 1.1.0 with Microsoft VS 2015

MCCI needs OpenSSL for a Windows project (that will be cross-platform). A casual search didn't turn up either a good source for cross-platform libraries, which meant we have to build them ourselves. A deeper search found a detailed guide here, and yet the details don't match what I found when I checked out the code; and the post doesn't talk about doing it directly from GitHub (which I wanted to do).

Here's the procedure for building OpenSSL on 64-bit Windows 10, with Visual Studio 2015. Others (July 2019) report that this procedure works with Visual Studio 2017 as well. I've not had a chance to try with Visual Studio 2019.

As this procedure dates from late 2016, you may find that there's a CMake or other, newer, procedure that's more suitable.

  1. If you don't have it, please install git bash from git-scm.com.