Skip to content
Snippets Groups Projects
Commit 74985da5 authored by Charlotte Vandenbulcke's avatar Charlotte Vandenbulcke
Browse files

adding updates on week 2 and 13

parent e6a7d271
No related branches found
No related tags found
No related merge requests found
Pipeline #474214 passed
......@@ -41,7 +41,7 @@
<section>
<h3>My journey</h3>
<p>At first I had to catch up on the first week so I worked on the website (design and content). After finishing the biggest part of it I tried several the Onshape, Freecad and Inkscape programs for 2D and 3D designing (I'm already familiar with Illustrator and Autocad).</p>
<p>At first I had to catch up on the first week so I worked on the website (design and content). After finishing the biggest part of it I tried Onshape, Freecad and Inkscape programs for 2D and 3D designing (I'm already familiar with Illustrator and Autocad).</p>
</section>
<section>
<h3>Creating my Fab Academy website</h3>
......@@ -290,13 +290,14 @@
<section>
<h3>UPDATE - My feeling about the softwares</h3>
<p>To work on 3D files, I mostly used Freecad, because I forgot about Onshape right after trying it out ^^' !</p>
<p>To work on 3D files now I mostly use Freecad. Simply because I forgot about Onshape right after trying it out ^^' !</p>
<p>I still have a lot to learn to use it correctly but I'm getting to it.</p>
<p>But designing in 3D still is hard for me, even if these programs are easy to use!</p>
<p>But designing in 3D still is hard for me, even if these programs are easy to use, as I'm easily lost in the 3-dimensions spaces !</p>
<blockquote>For my final project's 3D parts I used Thinkercad which is really a fun and easy way to learn designing in 3D and I think about using it again to learn the baby-steps of 3D design.</blockquote>
<br>
<p>For Inkscape, I'm used to Illustrator so it's really hard for me to like this program but I'm getting used to it and some functions, like vectorize a bitmap image or preparing an embroidery file, are well done. But my heart is still balancing on Illustrator's side !</p>
<br>
<p>One last thing that I want to say/question : WHY CAN'T ALL THE PROGRAM HAVE THE SAME SHORTCUTS FOR MOVING OBJECTS AND PAGES ! (right-mouse-click, left-mouse-click, center-mous-click, space bar, ctrl button, and more !)</p>
<p>One last thing that I want to say/question : WHY CAN'T ALL THE PROGRAM HAVE THE SAME SHORTCUTS FOR MOVING OBJECTS AND PAGES !? (right-mouse-click, left-mouse-click, center-mous-click, space bar, ctrl button, and more !)</p>
<p>I'm going crazy about it ! XD</p>
......
......@@ -509,6 +509,165 @@
<p>UPDATE : it was given as advice that it could come frome the "ESP32 chip" and "licence". I will search for that and hopefully be able to use and understand all it correctly as I will need that for my final project !</p>
<p><strong>2ND UPDATE</strong></p>
<p>We've tried the exercice again with my instructor and made it work this time ! Don't ask me why this one's working, I still can't figure it out ! I think it might come from my internet connection at home.</p>
<p>So the goal was to make two ESP32 communicate via WIFI, the first one being the "master" with a button and the second the "slave" with an LED, by switching on the LED of the "slave" using the button of the "master".</p>
<blockquote>I forgot the Neopixel LED Ring so we did it with a single LED.</blockquote>
<p><strong>"Master" ESP32 code</strong></p>
<pre>
<code>
#include < WiFi.h >
const char* ssid = "XXXXX";
const char* password = "XXXXX";
const char* host = "XXXXX"; // IP address of the "slave" ESP
const int buttonPin = 12;
void setup() {
Serial.begin(115200);
pinMode(buttonPin, INPUT_PULLUP);
connectToWiFi();
}
void loop() {
if (digitalRead(buttonPin) == LOW) {
sendCommandToSlave("TOGGLE_LED");
delay(500); // Delay to avoid button "rebound"
}
}
void connectToWiFi() {
Serial.print("Connection to WiFi");
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("Connected to WiFi!");
}
void sendCommandToSlave(String command) {
WiFiClient client;
if (!client.connect(host, 80)) {
Serial.println("Fail to connect to server");
return;
}
client.print(command);
delay(10);
client.stop();
}
</code>
</pre>
<p><strong>"Slave" ESP32 code</strong></p>
<pre>
<code>
#include < WiFi.h >
#include < WiFiClient.h >
#include < WiFiAP.h >
const char* ssid = "XXXXX";
const char* password = "XXXXX";
WiFiServer server(80);
const int ledPin = 14;
bool ledState = LOW;
void setup() {
Serial.begin(115200);
pinMode(ledPin, OUTPUT);
connectToWiFi();
server.begin();
}
void loop() {
WiFiClient client = server.available();
if (!client) {
return;
}
if (client.connected()) {
while (client.available() > 0) {
String command = client.readStringUntil('\r');
if (command == "TOGGLE_LED") {
toggleLED();
}
delay(10);
client.flush();
}
client.stop();
}
}
void connectToWiFi() {
Serial.print("Connection to WiFi");
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("Connected to WiFi!");
Serial.print("Slave ESP IP address : ");
Serial.println(WiFi.localIP());
}
void toggleLED() {
ledState = !ledState;
digitalWrite(ledPin, ledState);
}
</code>
</pre>
<span class="image object">
<img src="../images/both-slave-master-codes.jpg" alt="...">
</span>
<p><strong>"Master" ESP serial monitor message</strong></p>
<blockquote>Note : I already translated the printed message in the code above so that you just have to copy/paste without thinking about it ! ;) I forgot to do it during the exercice !</blockquote>
<span class="image object">
<img src="../images/master-esp.jpg" alt="...">
</span>
<span class="image object">
<img src="../images/master-serial-monitor.jpg" alt="...">
</span>
<p><strong>"Slave" ESP serial monitor message</strong></p>
<blockquote>Note : I already translated the printed message in the code above so that you just have to copy/paste without thinking about it ! ;) I forgot to do it during the exercice !</blockquote>
<span class="image object">
<img src="../images/slave-esp.jpg" alt="...">
</span>
<span class="image object">
<img src="../images/slave-serial-monitor.jpg" alt="...">
</span>
<br>
<span class="object">
<video width="600" height="300" controls>
<source src="../images/2esp-connected-by-wifi.mp4" type="video/mp4">
</video>
</span>
<br>
<blockquote>
Note : the button component wouldn't work (I'm cursed for this exercice) so we used the wires connection instead. It works the same !
</blockquote>
</section>
<hr>
......
File added
public/images/both-slave-master-codes.jpg

108 KiB

public/images/master-esp.jpg

77.9 KiB

public/images/master-serial-monitor.jpg

31.6 KiB

public/images/slave-esp.jpg

75.2 KiB

public/images/slave-serial-monitor.jpg

34.3 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment