Light Following Robot

Full Code

This projects is a light following robot that implements a plan, perception, action coding structure in order to read input from various sensors atttached to the robot and then implments the correct response based on pre-planned responses.

The program's main loop consists a

Initial Listening Socket

I then used a while loop to wait for the listening pocket find a connection. When it does, we add the file descriptor of that connection to our epoll() instance. We continue this loop, each time executing whatever i/o data is available from the connection and adding new connections as they become available.

Loop for Monitoring Connections

We the use some trivial code to do the bit transfers for the client and the server. I implemented three commands, set (to create a connection), get (to get the data from that connection), and del(to remove a connection). In this way we can monitor the data stored in our server by making connection from out client. We first run our server, and create a socket to listen from.

Running Server

We are then able to send commands from a client, set data values, get those data values, and delete those values.

Send commands from client