This week we presented our second powerpoint to the class. I worked on the wireless communication portion and a couple of the beginning slides. I also helped with correcting the titles to make sure they are descriptive statements.
Dr. Furman told us that we are allowed a small space during Maker Faire and would have to shorten the length of the track. A couple of our team members when to the courtyard at SJSU where the half-scale track was being held and found that there is a part that can be easily sectioned off. We will keep 18ft of the track including the slope and y-junction. The legs will also be cut to around 4ft so that the bogie will just hover over the floor. This week, I found a pair of Xbee modules in a box while looking through an unclaimed cabinet brought from the old warehouse. With the 2 S1 edition modules was also an Xbee shield which will be used to fit onto the Arduino. Looking through the Sparkfun website where the Xbees are sold, shows that the module takes in 3.3V and 50mA. The range of the Xbee is 300ft which will be able to accomplish our goals. Figure 1. Xbee module Figure 2. Shield for Arduino It was found that it could have been the Small-sca
To understand the NRF24L01 code, I tried to use the module functions to simply turn on an LED. The code is shown below. I believe that once the initial parameters are set up in and before the setup, the code should be relatively simple. The radio.read and radio.write functions are necessary and for the master code used for our purposes, these functions simply need to be placed in the correct locations to get data transferred from the mater bogie to the LCD screen and remote. Transmitter Code to turn on an LED: #include <SPI.h> #include "RF24.h" const int led = 43; int ledState = 0; RF24 radio (7, 8); // CE, CSN. “radio” can be renamed to anything byte address[6] = {"0"}; char text[100] = "Hi"; void setup() { Serial.begin (9600); delay(1000); radio.begin(); radio.setChannel(115); // set frequency to channel 115 radio.setPALevel(RF24_PA_MAX); radio.setDataRate (RF24_250KBPS); radio.openWritingPip
Comments
Post a Comment