Showing posts with label Code. Show all posts
Showing posts with label Code. Show all posts

Wednesday, May 29, 2013

Update 5/27

5/27/12 Update:

The POD and ROAMER have achieved basic functionality, with some adjustments still to be made.

Circuits have been in their final state since 5/23, with a final decision to implement an H-bridge in the gripper circuit to allow additional current to flow for greater grip strength.

Software is largely finished with some minor tweaks to be made. There are still occasional problems upon connection with the ROAMER: the POD does not always register a connection immediately, and the connection occasionally breaks. These issues were largely mitigated, however, in the last couple of days, and additional fixes targeting unwanted incoming signals will be implemented as well. A major bug involving the POD software getting stuck in a while loop during the AD conversion sequence was fixed, eliminating most of the break-mid-connection problems. Connection LED and ROAMER select input will be implemented in the next day or two.

The POD mechanical structure is in its final form. The ROAMER has been built, and minor adjustments outlined after initial testing remain: the ROAMER does not drive well on the carpet, has trouble going up hills, has trouble with fine gripper movements, and fails to drag the box over the door threshold because the gripper height is limited. Fixes will be designed and implemented in the next two days.

Wednesday, May 22, 2013

Pre-checkoff Update

As of Wednesday, May 22, the POD successfully senses analog inputs and forwards the data to the ROAMER. An error in which the POD does not reconnect after a disconnect has been fixed; however, an error remains in which other teams' broadcast signals seem to break the connection.

The SPECIAL communication with the SPECIAL PIC and forwarding to the ROAMER brain was also successfully implemented. Transfer of all circuits to protoboards is nearly complete. Processing and output of commands by the ROAMER is next on the schedule and will be completed for the checkoff tomorrow.

Tuesday Checkoff Success

The team was successfully checked off late on Tuesday. Communication nodes were all successfully implemented with the exception of the SPECIAL PIC, which was tested the previous Thursday. In the state at which the project was in for checkoff, the following items were implemented and functioning:

- The POD brain could successfully sense and send digital inputs and send the state of these digital inputs via SPI to the POD radio PIC. This "command" was implemented using the framework of the communication protocol. The POD brain could also receive the "status" from the E128 (via SPI communication with the POD radio PIC) and successfully execute broadcast/ connect and disconnect actions. In situations where the ROAMER fails to reply, the POD disconnects and puts out its "connect status" light.

- The POD radio PIC could successfully receive the command from the POD brain and simultaneously send the status of the E128 to the POD brain. Upon receiving a command from the brain, the radio PIC would immediately build the data packet and forward to the POD XBee, which would transmit the command to the ROAMER XBee.

- The ROAMER XBee would successfully receive the command from the POD and forward the command to the E128/ brain. At the same time, it would receive the E128 status from the brain and send this information via asynchronous communication to the XBee radio, which would transmit it to the POD.

- At the time of checkoff, the SPECIAL communication was not implemented but was shown to work during the previous checkoff, in which the SPECIAL PIC communicated the status of the SPECIAL to the E128.

Wednesday, May 15, 2013

SPECIAL PIC Programming Complete

The SPECIAL PIC is now programmed to be fully functional in relaying information between the SPECIAL and the E128. There is a currently uncommented "testing block" that is functioning and is designed to work with the ins/ outs and LEDs currently set up on the breadboard. A block of code that is currently commented enables the SPI communication with the E128. Code was nearly identical to the SPI code already in place and will hopefully require minimal debugging. Debugging scheduled for tomorrow.

Monday, May 13, 2013

SPECIAL and XBee comm working

Monday, May 13 -

First two parts of the check-off completed... XBee radios and their respective PIC/ E128 are sending input information to each other and displaying states on output LED lines. The SPECIAL PIC constantly reads battery charge and charging state along with LED status info from the SPECIAL. When a button is pressed (analogous to E128 lowering line to request Special info) "status LEDs" are lit to display current SPECIAL status and updated battery info can be read in the debugger registers. Moving on to Brain state machines tomorrow.

Saturday, May 11, 2013

Code for XBee Radio PICs

Saturday, May 11

Programming for the POD XBee PIC was completed to a level that demonstrates radio functionality and the ability to communicate with another radio. Additional cases (e.g., an incoming command from the Brain is received before transmission is complete) were not yet covered but are noted in the code and will be developed once all conditional cases are worked out as they relate to the Brains. With no receiving radio, the PIC successfully sends the command on its input lines using the Communications Protocol as its structure, then receives and processes a no ACK. Currently, it does this indefinitely.

Programming for the E128 XBee communication is nearly complete and should be functional shortly.

A state machine was developed for the SPECIAL PIC to be programmed in Assembly, and detailed pseudocode was written out that can be translated relatively easily into software. Development and debugging of this code is scheduled for tomorrow.

Wednesday, May 8, 2013

State Machines

Wednesday, May 8

State machines were developed for the PICs communicating with the XBee radios on both the POD and ROAMER sides. It was decided to aim for early check-off and demonstrate communication functionality between the two radios using two input lines and two output LEDs each - then move forward with programming the Brains.