44CON 2013 - Controlling a PC using Arduino

Preview:

DESCRIPTION

Slides from the workshop "Controlling a PC using Arduino" conducted at 44CON 2013 in London. It goes through hardware and software used to remotely control a PC (power/reset). Future developments will be including a telnet/rs232 and environment variables.

Citation preview

Controlling a PC using Controlling a PC using ArduinoArduinoMichael BomanMichael Boman

The componentsThe components

Arduino Development BoardArduino Development Board

Arduino Ethernet ShieldArduino Ethernet Shield

Arduino Relay ShieldArduino Relay Shield

Code: REST serverCode: REST server

Arduino Development Arduino Development BoardBoard

Arduino Ethernet ShieldArduino Ethernet Shield

Arduino Relay ShieldArduino Relay Shield

How does a relay work?How does a relay work?

CodeCode

FunctionsFunctions

void setup()void setup()

void send404(EthernetClient client)void send404(EthernetClient client)

void sendStatus(EthernetClient client, char *variable, char void sendStatus(EthernetClient client, char *variable, char *value)*value)

char** parse(char* str)char** parse(char* str)

void reboot(int relay)void reboot(int relay)

void handleCommand(EthernetClient client, char* cmd, char* void handleCommand(EthernetClient client, char* cmd, char* param)param)

int countSegments(char* str)int countSegments(char* str)

void loop()void loop()

Testing CodeTesting Code

Uploading CodeUploading Code

Monitoring ExecutionMonitoring Execution

FutureFutureRS232 Interface / Telnet ServerRS232 Interface / Telnet Server

FutureFutureTemperature monitoringTemperature monitoring

Combined Relay/TempCombined Relay/Temp

Questions and AnswersQuestions and Answers

michael@michaelboman.orgmichael@michaelboman.org

@mboman@mboman

Recommended