-
Notifications
You must be signed in to change notification settings - Fork 608
Open
Labels
Priority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releasebugSomething isn't workingSomething isn't working
Description
Describe the bug
ActiveMotor doesn't work on BuildHat.
ActiveMortor works in Python.
It does not work with Iot.Device.Bindings.
Steps to reproduce
I am running BuildHat on a Raspberry Pi 4.
I can use BuildHat to move a motor with the following Python program.
from buildhat import Motor
motor = Motor('A')
motor.run_for_seconds(5)To do the same thing in .NET, I ran the following code:
using Iot.Device.BuildHat;
using Iot.Device.BuildHat.Models;
using Iot.Device.BuildHat.Motors;
using var brick = new Brick("/dev/serial0");
brick.WaitForSensorToConnect(SensorPort.PortA);
var motor = (ActiveMotor)brick.GetMotor(SensorPort.PortA);
motor.SetPowerLimit(0.7);
motor.SetBias(0.3);
motor.TargetSpeed = 50;
motor.MoveForSeconds(5);No exceptions are thrown, but the motor doesn't move.
Set the debug LoggerFactory in LogDispatcher.LoggerFactory and attach the file with the log output.
Do you know the cause?
Versions used
| Item | Verison |
|---|---|
| Build Environment dotnet | 9.0.3 |
| Execution Environment | linux-arm64 self-containedSystem.Device.Gpio |
Metadata
Metadata
Assignees
Labels
Priority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releasebugSomething isn't workingSomething isn't working