networking and communication


-----------------------------------------------------------------------

for this week's assignment, we were tasked with creating a network or some sort of communication with another board or device. i attempted both for this week.

fabtinyisp2


a couple weeks ago, my fabtinyisp stopped working in the middle of uploading code to one of my boards. one second it was working, the next it wasn't. i still don't know the cause of this, but i have been programmer-less for a couple weeks and i have not been enjoying it. i have found that i really like that i can be mobile in my programming, so i can do it in the comfort of my own room -- buying my own ftdi cable has been a game changer, and now i need a new programmer.

anywho, milled it again, soldered it again, took WAY less time than it took me the second week of school (thank god, it would have been super sad if it had). then i tried to program it -- of course i had problems.

the error i was receiving was "make: *** [flash4] Error 1," which when i looked up, meant that the drivers weren't all installed on the Linux computer in the arch shops. i tried to install them with no luck. so i went to eecs, did the programming process again: make, make flash, make fuses, rstdisbl.



everything went smoothly.

new (same old) programmer:



bluetooth


i decided to just replicate Neil's hm-11 board for this week. since i don't plan on using bluetooth for my final project, i didn't want to dedicate too much time to trying to configure an entirely new board for the bluetooth, but if i eventually ever did want to use bluetooth, i could easily use a connector board to connect to the serial communication on my final board.

i milled and soldered the board without any problems. the final board is shown below:



then i went about trying to get serial communication between my phone and the serial arduino monitor. at first i was having trouble visualizing how this would work by simply connecting the bluetooth chip to the serial monitor.

this site was extremely helpful for this process, and it had great detailed explanations for each of the components. they essentially were: 1) connect the bluetooth board to the computer using a FTDI cable, 2) download a app on your phone that is able to send/receive strings from a BLE4.0 (for iphone, i used LightBlue), 3) look for the module on the app (should be labled HMSoft), 4) click on HMSoft, 5) click the bluetooth device, 6) toggle the "Listen for notifications" to "Listening", 7) click "Hex" in the top right and toggle to "UTF-8 String" (so that you can input and output strings) 8) using the arduino serial monitor send a string and it should appear under "Read/Notified Values," 9) use "Write new value" to send communication back to the computer.





this was fun to play with for a bit, and maybe in the future, i'll create an app that takes serial communication as commands for my final project, but I wanted to try some other things this week as well.

master/slave boards


this week i really wanted to get communication between my input and output boards to work. i also wanted to just do some more work on my input board -- during that week, my thermistor was reading in temperatures into my arduino serial monitor, but they weren't the right temperatures, and when i warmed up the thermistor, the values the thermistor were displaying were decreasing instead of increasing. some workshopping with this and trying to understand the voltage/resistance/current equations that go into this, i found my error, and finally!! my thermistor is picking up accurate temperatures and is increasing as it gets hotter.



i also was not able to get my output board done last week, so i milled another board (that hopefully i'll be a prototype for my final project) that had a RGB light, pins to a seperate power source, and pins to connect to a heater. i milled and soldered these boards.



this was the code for my output board and a video of it working:



then i tried to program them as master and slave. my master circuit was the input circuit which would send data to my slave output circuit which would receive the data. the code says that if the thermistor reaches above a certain temperature, then it will send "1" to the serial monitor and turn the RBG light on the output circuit on Red, and if the temperature is less than that certain temperature, it will send "0" to the serial monitor and turn the RBG light blue. the code i used to program these are shown below:





there were problems with this. i was able to connect the two circuits together, and my thermistor would be reading temperature and outputting 0s and 1s in the serial monitor, but the RGB light was not changing color. i was also having trouble with my power source.. i would connect the two boards, and the board would start smoking?? i made sure i was connecting in the correct orientation, so i'm not sure if my power source was too large? i will definitely be going to the eecs office hours to get this figured out so i can get some more progress for my final project