Browse Source

Begin writing motor control system

master
Starbeamrainbowlabs 4 years ago
parent
commit
711e86f918
4 changed files with 9 additions and 6 deletions
  1. +1
    -1
      PixelHub-Client/PixelBot.cpp
  2. +6
    -2
      PixelHub-Client/PixelBotController.h
  3. +0
    -1
      PixelHub-Server/PixelHub/PixelHub.cs
  4. +2
    -2
      PixelHub-Server/PixelHub/Program.cs

+ 1
- 1
PixelHub-Client/PixelBot.cpp View File

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


+ 6
- 2
PixelHub-Client/PixelBotController.h View File

@ -13,6 +13,10 @@ public:
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
};

+ 0
- 1
PixelHub-Server/PixelHub/PixelHub.cs View File

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


+ 2
- 2
PixelHub-Server/PixelHub/Program.cs View File

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