Skip to content

Trying to make diff-steer work with my Raspberry Pi #1

@malvar0929

Description

@malvar0929

Hello, I'm trying to use your code for a rover I've built with a Rasberry Pi running Raspbian Stretch, L298N H-bridge motor driver, and Node js v: 8.11.1.

I apologize in advance but I'm a complete noob when it comes to Node JS or any programing language for that matter.

I'm thinking all I need to make this work is diff-steer and a gamepad right, and Johnny-Five is optional correct?
I can control the motors without any issues in Python however I'm using a web based app called Blynk that requires Node JS.
What I'm really confused about is where the heck do I declare the GPIO pins for PWM control?

For starting out I tried running motor_control_test.js but I got the error below.
Any help will be so much appreciated or maybe a quick basic steps to make the motors come alive. I would love to have differential steer on my rover.
Thank you in advance.

/home/pi/blynkpi/node_modules/diff-steer/test/diff_steer_test.js:1
(function (exports, require, module, __filename, __dirname) { import test from 'ava';
                                                              ^^^^^^

SyntaxError: Unexpected token import
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions