This commit is contained in:
2025-04-08 11:24:32 +02:00
parent 960411167a
commit 465c5b186a
4 changed files with 3 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -34,14 +34,14 @@ When compiling the main side it worked fine but when compiling the secondary sid
After that we tried with an SPI screen and there we spent over 2.5 hours attempting to get it to work. Checking the wires multiple times. Trying another screen. Trying different example codes. We had everything correct according to the datasheet and the driver chip that was inside the board.
![alt text](image-5.png)
![alt text](image-5.jpg)
We also connected the serial monitor to it and read the data from it. It was sending a lot of commands so that was working but it is very hard to figure out if the commands are correct since they are machine instructions. So we ended the day there and got beers and a bar.
## Individual Assignment
I kinda did my individual assignment in the [programming week](../week_4_programming/programming.md) since I was both programming the handheld controller and the flight controller at the same time. During that week I also set up the communication between the 2 devices using ESPNow. ESPNow is a protocol skip a lot of OSI layers thus minimizing the overhead. It doesn't do handshakes so it kind of works like UDP. It's also peer to peer so it doesn't need any network infrastructure making it completely decentralized.
![alt text](image-6.png)
![alt text](image-6.jpg)
[Source: arduino](https://docs.arduino.cc/tutorials/nano-esp32/esp-now/)
@@ -75,7 +75,7 @@ peerInfo.encrypt = true;
The PMK and LMK need to be exactly 16 bytes so to count to amount of bytes I used in my key I used this website. Most of the time you can go for each character is 1 byte. But there are also some online tools available. https://tools.smikkelbakje.nl/text-statistics or https://mothereff.in/byte-counter
They should be the same on each board you wanna communicate with. The only flaw about this protocol is that the devices that receive decrypted messages still interpret them as if they where encrypted and they use the data inside them.
![alt text](image-7.png)
![alt text](image-7.jpg)
??? Sender example