14. Networking and communications¶
14.0 Assignments¶
Task: Embedded Networking and Communications¶
Group assignment:¶
- Send a message between two projects [Link to this week’s Group Assignment For the group assignment we connected several of our projects together via different physical links ( wire, IR) and different protocols ( Serial communication, MQTT Broker/Message Bus)
Here is the more ambitious layout that we started with, we ran out of time to implement all of it.
Individual Assignment:¶
- Design, build, and connect wired or wireless node(s) with network or bus addresses
14.0.1 Learning Outcome¶
-
Demonstrate workflows used in network design
-
Implement and interpret networking protocols and/or communication protocols
14.1 Individual Network Communication Project Documentation¶
14.2 Lessons Learned from the Implementation of Networking and/or Communication Protocols¶
14.3 Project’s Programing Processes¶
14.3 Outlined Problems and Solutions¶
14.4 Design and Fabrication¶
14.4.1 Design Files¶
14.4.2 Original Code¶
14.4.1 Design process¶
14.2.2 Problems and solutions¶
-
The browser selected for the use of modsproject.org could potentially be a source of problems when producing the milling file.
-
Failing to align the cooper plate and milling bit to the exact X = 0 & Y = 0 position caused the final result to appear to be missing a portion. Although it could be fatal at times, for this specific board, was not the case.
USB Mini & Micro¶
The use of USB’s enables efficient access to electricity to function and the possibility for data exchange in and out of the microcontroller. The two main options are USB Mini and Micro. Both with advantages and disadvantages.
The teachers at the FabLab Barcelona have learned, overtime, that the best option is to use a USB Mini, as it is “easier to work with”. In the case of my specific board. For me “easier” is seldom better, therefore, after my previous “LED Molón Project”, I decided to switch to the “Micro” version.
The result was a smaller and yet “more difficult” component to solder: “No problem with that”.
Fig. #1. & #2. USB Micro PadSize Editing
The great difference came when the board fragility was tested several times, only to fail 100% of times. I sense am learning a lot, though.
The disadvantages of corporate owned technology¶
Microcontrollers are generally produced by companies who own the proprietary rights, allowing consumers only partial access to the product’s data and information. During the FabLAb Barcelona’s lecture on “Input Devices” we were explained on how it is sometimes difficult to utilise Arduino for the programing of some microcontrollers (i.e. the Atmel’s SAM D11C 14A microcontroller) due to not being granted access to their corresponding libraries.
The quick fix¶
However, in some cases there is a way around. For the specific case of the SAMD11D14A, thanks to the work of Victor Barberan and Josep Marti from the FabLab Barcelona node, who were able to enable the Arduino libraries for the capacitive sensor of the SAM D11D 20-pin SOIC to the SAM D11C 14-pin SOIC by rightly editing the code given the similarities of the two microcontroller.
Fig. #3. “The quick fix”
Fig. #4. Arduino’s CapacitiveSensor Libraries
13.4 Files and code¶
13.4.1 Original design files¶
13.4.2 Source code¶
13.5 Video¶
13.6 Conclusions¶
To this moment in time I have been facing a vast array of problems that have kept me from being able to program the board I have created. Will continue working on it until success finds me.
Datasheet¶
Pad properties editing - ArduinoCore-SAMD11C14A SAMD11C14APinout )
//: # (Installation of the ESP32 libraries in Arduino in order to communicate with the “Barduino” board
<<!—
“Networking is connecting bits.” ~ Victor B
We use networks and communication protocols to distribute and connect systems due to: -location: not all operations in a system are [psson;e pm tj same hardware - paralellism: we want to do several things at the same time -modularity: to develop modules
Networks are not perfect, they always fail… VB The percentage of errors is related to speed and distance. Protocols include error correction within the algorithm.
XA: check computerphyle channel on YT. Error detection and fixing episode
eight ceroes and ones is one bit.
go to local classes to see the lecture documentation
When sending a message in Arduino (Analog Read Serial), is possible to see the speed at which the messages are being sent.
Defining the speed withing asincronious communication helps when receiving the messages.
ASCII table to translate the series of 00 and 11 into specific carachters UTIF
serial.pring (translates to carachters) serial.write
in the Arduino documentation page there is a page with the Serial.write() xa: busca la presentación porque sin ella no entenderás de qué fue
include ¶
SoftwareSerial BTI (10.11); // RX | TX
void setup () {
Serial.begin(9600);
BT1.begin(38400); // No need for it to be at the same speed!
}
void loop() { // if (BT1.available())
Libraries for Python - [pyserial](
protocols serve to double check the data sent is being received through the vast array of frequencies used.
Dbi is the unit to measure the sensibility of an antenna.
—>
Useful links¶
FA BCN Local Documentation - Networking and Communications MQTT