notes

Mike is having trouble with the mbient labs MetaHub tutorial.
tl;dr the problem appears to be with the bindings file. It might be related to a note that scaryghost referred to in a commit comment: "Forgot to commit updated JS bindings". Another problem I have is that when I run npm install metawear, my RPi freezes.

Dummy code

  • lists
  • right?

I followed the MetaHub tutorial and cloned the JavaScript repo. The only steps that I skipped was 21.1 since I used the GUI rather than CLI. I did everything from 21.4.3 through the end. In case it matters, I installed setup_6.x and not setup_8.x. Now I'm getting a debug error (below). You can see the linux details here and a photo of my setup.


It's now 1.30pm (I emailed Laura at 12noon), I'm still trying to get the MetaHub to work. I noticed that in the JavaScript Github README it says to run npm install metawear, but when I do that my RPi freezes :(


It's now 2pm. I missed some of the subtleties of the instructions. I added the noble packages. Now I've got progress and new problems :) https://github.com/mikimer/notes/blob/master/details2.md

pi@raspi:~/MetaWear-SDK-JavaScript/examples $ 
pi@raspi:~/MetaWear-SDK-JavaScript/examples $ node led.js 
module.js:471
    throw err;
    ^

Error: Cannot find module '../MetaWear-SDK-Cpp/bindings/javascript/cbindings'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/pi/MetaWear-SDK-JavaScript/lib/metawear.js:17:17)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
pi@raspi:~/MetaWear-SDK-JavaScript/examples $ 


It's now 3pm
I'm going to try to use Python instead of JavaScript...
I'm getting another error related to cbindings
Details here: https://github.com/mikimer/notes/blob/master/details3.md


It's Wednesday and I've followed all of the MetaHub tutorial from scratch and a brand new RPi. This time I installed everything via the CLI, not the GUI.

I'm still getting a memory overflow error with the file_operations.cpp file. I took a photo when it initially happened and another photo 20mins later.

In case it matters, the tutorial says to use either NodeJS 6 or NodeJS 8. I've only tried using NodeJS 6 since I don't expect that it affects things.

This second Raspberry Pi is also from CanaKit: https://www.amazon.com/CanaKit-Raspberry-Ultimate-Starter-Kit/dp/B01C6Q4GLE