Skip to content

TypeError: responseBuffer not iterable #8

@scpa1055

Description

@scpa1055

I am getting this Error in a loop

TypeError: responseBuffer is not iterable at spi.transfer (/home/pi/Documents/brickPi/node_modules/brickpi3/index.js:288:41)

trying to run following code:

const brickpi3 = require('brickpi3');

(async () => {
    try {
        let BP = new brickpi3.BrickPi3();
        
        //Make sure to stop and free all motors and sensors when the programm exits
        brickpi3.utils.resetAllWhenFinished(BP);
        
        let motor = brickpi3.utils.getMotor(BP,BP.PORT_A);
        motor.setPosition(360);
    } catch (err) {
        console.log(err);        
    }
})();

the program executes the rotation but stucks in the Error.

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