Skip to content

freezeLUO/CyberGear

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚙ CyberGear

This repo is a .Net implementation of CyberGear.

👋 How to use?

Using the builder pattern to build CanBus.

var builder = CanBus.CreateBuilder(SlotType.Usb, 1);
builder.Configure(opt =>
{
    // set can bitrate, which default value is Pcan1000
	opt.Bitrate = Bitrate.Pcan1000;
    // set masteridd which default value is 0
    opt.MasterId = 0;
    // add motor can id range
    opt.AddMotors(new uint[] { 2, 127 });
});
CanBus can = builder.Build();

Where are the motors?

var motor0 = can.Motors[0];
var motor1 = can.Motors[1];
var motorFeedback = await motor0.SetMechanicalZeroAsync();

👉 Matters

  • Please use a PCAN compatible device
  • PEAK official website driver
  • Download Peak.Can.Basic(4.8.0.830) through nurget
  • Example: CyberGearPlayground

📒 Referrence:

About

小米Cybergear电机C#.NET开发;PCAN-USB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages