Week 13: Networking and Communications¶
This week we focus on networks and communications.
The assignment was:
-
individual assignment: Design, build and connect wired or wireless node(s) with network or bus addresses and a local interface
-
Group assignment: send a message between two projects
Individual assignment with potentiometer¶
For individual assignment we use Arduino and our XIAO RP2040 microcontroller, we connect it and then we add the microcontroller in tools
Now we write the code for that we are going to use a potentiometer, our board that we have worked on, microcontroller and cables, the program makes the servomotor move continuously from 0 to 180 degrees and then back to 0 degrees, while printing the positions on the serial monitor during return movement
The cable connection is as follows: - Signal cable (usually yellow or white): Connect to a GPIO pin that supports PWM on the XIAO RP2040. For example, you could use D10. - Power cable (normally red): Connect it to the 3.3V pin of the XIAO RP2040. However, keep in mind that many servo motors require 5V, so you may need an external 5V power supply. - Ground wire (usually black or brown): Connect it to one of the GND pins of the XIAO RP2040.
We load the code and verify that it is compiling in arrow A we press to load the program to the XIAO RP2040 microcontroller. In arrow B we verify that it loads without any error and in arrow C it shows us complete loading
We go to tools and serial plotter to observe when we move the potentiometer
We verify when we move the potentiometer it increases and decreases the intensity
Files 1¶
Individual assignment with servomotor¶
We open Arduino and make the code and connect it to the XIAO RP2040 microcontroller
Now we make the connections
- Signal wire (usually yellow or white): Connect to pin D10 (or any other PWM pin you choose).
- Power cable (normally red): Connect it to the 5V pin of the XIAO RP2040.
- Ground wire (usually black or brown): Connect to a GND pin of the XIAO RP2040
Here I have a problem since the servomotor does not work, I am trying to solve the problem