Begin writing motor control system

This commit is contained in:
Starbeamrainbowlabs 2017-01-19 19:53:16 +00:00
parent 63dbbdde0a
commit 711e86f918
4 changed files with 9 additions and 6 deletions

View file

@ -142,7 +142,7 @@ bool PixelBot::Tick()
return true; return true;
} }
bool PixelBot:processCommand(String command) bool PixelBot::processCommand(String command)
{ {
return false; return false;

View file

@ -13,6 +13,10 @@ public:
private: private:
int motorLookup[8] = {B01000, B01100, B00100, B00110, B00010, B00011, B00001, B01001};
} int motorSpeed = 1200; //variable to set stepper speed
int count = 0; // count of steps made
int countsperrev = 512; // number of steps per full revolution
};

View file

@ -105,7 +105,6 @@ namespace PixelHub.Server
while(true) while(true)
{ {
TcpClient nextClient = await server.AcceptTcpClientAsync(); TcpClient nextClient = await server.AcceptTcpClientAsync();
Console.WriteLine("Got connection");
AsyncTools.ForgetTask(Handle(nextClient)); AsyncTools.ForgetTask(Handle(nextClient));
} }
// TODO: Add an shutdown CancellationToken thingy here // TODO: Add an shutdown CancellationToken thingy here

View file

@ -23,8 +23,8 @@ namespace PixelHub.Server
IPAddress.Parse("239.62.148.30"), port, IPAddress.Parse("239.62.148.30"), port,
beaconWriter beaconWriter
); );
beacon.LocalIP = IPAddress.Parse("192.168.0.5"); beacon.LocalIP = IPAddress.Parse("10.42.0.1");
beacon.NetworkInterfaceName = "wlan0"; beacon.NetworkInterfaceName = "wlp2s0";
PixelHub server = new PixelHub(port, serverWriter); PixelHub server = new PixelHub(port, serverWriter);
//server.BindAddress = IPAddress.Parse("10.42.0.1"); //server.BindAddress = IPAddress.Parse("10.42.0.1");