nebrius / raspi-io

An IO plugin for Johnny-Five that provides support for the Raspberry Pi
MIT License
546 stars 63 forks source link

Unknown Board Revision c03112 - Raspberry PI 4 with 4GB #126

Closed D1no closed 4 years ago

D1no commented 5 years ago

Hi, I try to run Johnny Five on my new Raspberry PI 4 c03112. #119 mentioned a new revision number — apparently there is another one. How can I force it in the mean time to use c03111?

pi@raspberrypi:~/servo_pointer $ yarn start
yarn run v1.19.1
$ sudo node ./server.js
Unknown board revision c03112, assuming Raspberry Pi Zero/2/3 pinout. Unless you are running a compute module or very old RPi this should work fine. Please report this board revision in a GitHub issue at https://github.com/nebrius/raspi-board.
1574610392096 Available Raspi IO  
1574610392100 Connected Raspi IO  
1574610392106 Repl Initialized  
>> /home/pi/servo_pointer/node_modules/j5-io/dist/core.js:69
        throw new Error(`Unknown pin "${pin}"`);
        ^
const five = require("johnny-five");
const Raspi = require("raspi-io").RaspiIO;

const board = five.Board({
  io: new Raspi()
});

board.on("ready", () => {
  const led = new five.Led("P1-P12");
  led.blink();
});
nebrius commented 4 years ago

Hi @D1no. The message printed is a warning only, and should work just fine with revision c03111. I'll get it added to the list.

The crash your experiencing is unrelated to the warning. The issue you're experiencing is because P1-P12 is not a valid pin. Did you mean P1-12?

EDIT: upon further investigation, that board revision was added some time ago. Please run npm update to ensure you're using the latest version of all dependencies, and ensure that you're using version 10.0.4 of Raspi IO.

D1no commented 4 years ago

Ok I'll need to check that when I play around again. In the last version I locally needed to patch add the revision number to the node module listing.