<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rania Sasi Kirana on Medium]]></title>
        <description><![CDATA[Stories by Rania Sasi Kirana on Medium]]></description>
        <link>https://medium.com/@raniakiranaa15?source=rss-3dda1a44a171------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*egh7RJBs1EwpTxaF</url>
            <title>Stories by Rania Sasi Kirana on Medium</title>
            <link>https://medium.com/@raniakiranaa15?source=rss-3dda1a44a171------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 23:46:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@raniakiranaa15/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ESP32 Project: Web Server]]></title>
            <link>https://medium.com/@raniakiranaa15/esp32-project-web-server-79dc81ddd547?source=rss-3dda1a44a171------2</link>
            <guid isPermaLink="false">https://medium.com/p/79dc81ddd547</guid>
            <category><![CDATA[web-server]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[esp32]]></category>
            <dc:creator><![CDATA[Rania Sasi Kirana]]></dc:creator>
            <pubDate>Sun, 02 Apr 2023 06:55:18 GMT</pubDate>
            <atom:updated>2023-04-04T09:58:01.233Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>a step-by-step guide</blockquote><p>Hello and welcome back! Let me reintroduce myself, my name is Rania Sasi Kirana and this is a story about a project I did in my class, II2260 Embedded System in Bandung Institute of Technology. If you’re new here, kindly check out my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED blink</a>.</p><h4>About this project</h4><p>This project will experiment on client-server communications between ESP32 microcontroller. The objective of this project is to create a standalone web server with an ESP32 that controls outputs (LEDs). The web server is mobile responsive and can be accessed with any devices that is a browser on the local network.</p><h4>More on ESP32</h4><p>ESP32 can be accessed by the browser, to monitor the conditions surrounding and device controls. The ESP32 will be connected with the BMP280 sensor that is used to monitor the condition surrounding based on temperature, pressure, and altitude.</p><h4>Step 1: Software Required</h4><p>Before we start, make sure you’ve installed Arduino IDE and the ESP32 boards add-on as we will program the ESP32 using Arduino IDE. If you haven’t installed it yet, don’t worry because I did a step-by-step guide on installing it in my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED Blink</a>.</p><h4>Step 2: Hardware Required</h4><ul><li>DOIT ESP32 DevKit v1</li><li>BMP280 Sensor</li><li>LED</li><li>Resistor 330 ohm</li><li>Breadboard</li><li>Jumper wires</li></ul><h4>Step 3: Web Server</h4><ol><li>Assemble the circuit using ESP32, LED, resistor, BMP290 Sensor, breadboard, and jumper wires.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2pjE2Gpey9sqQWaMFXHDtw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uOOF0JLxtzst6iSFFi2F_w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9cRjesEFbUmmL_kNhofobQ.jpeg" /><figcaption>Project 8: Web Server (Circuit)</figcaption></figure><p>2. Run the code below on Arduino IDE. If you don’t know how to run a code yet, you can simply check out my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED Blink</a> as I’ve explained the step-by-step process on selecting the right board and port to connect the ESP32 to your computer and running the program.</p><p>Don’t forget to change the ssid and password variables according to your own Wifi and password.</p><pre>// Load Wi-Fi library<br>#include &lt;WiFi.h&gt;<br>#include &lt;Wire.h&gt;<br>#include &lt;Adafruit_BMP280.h&gt;<br>#include &lt;Adafruit_Sensor.h&gt;<br><br>#define SEALEVELPRESSURE_HPA (1013.25)<br><br>Adafruit_BMP280 bmp; // I2C<br><br>// Replace with your network credentials<br>const char* ssid     = &quot;sasi&quot;;<br>const char* password = &quot;seksabar&quot;;<br><br>// Set web server port number to 80<br>WiFiServer server(80);<br><br>// Variable to store the HTTP request<br>String header;<br><br>// Auxiliar variables to store the current output state<br>String output26State = &quot;off&quot;;<br>String output27State = &quot;off&quot;;<br><br>// Assign output variables to GPIO pins<br>const int output26 = 26;<br>const int output27 = 27;<br><br>// Current time<br>unsigned long currentTime = millis();<br>// Previous time<br>unsigned long previousTime = 0; <br>// Define timeout time in milliseconds (example: 2000ms = 2s)<br>const long timeoutTime = 2000;<br><br>void setup() {<br>  Serial.begin(115200);<br><br>  // Initialize the output variables as outputs<br>  pinMode(output26, OUTPUT);<br>  pinMode(output27, OUTPUT);<br>  // Set outputs to LOW<br>  digitalWrite(output26, LOW);<br>  digitalWrite(output27, LOW);<br><br>  // default settings<br>  // (you can also pass in a Wire library object like &amp;Wire2)<br>  //status = bme.begin();  <br>  if (!bmp.begin(0x76)) {<br>    Serial.println(&quot;Could not find a valid BMP280 sensor, check wiring!&quot;);<br>    while (1);<br>  }<br><br>  // Connect to Wi-Fi network with SSID and password<br>  Serial.print(&quot;Connecting to &quot;);<br>  Serial.println(ssid);<br>  WiFi.begin(ssid, password);<br>  while (WiFi.status() != WL_CONNECTED) {<br>    delay(500);<br>    Serial.print(&quot;.&quot;);<br>  }<br>  // Print local IP address and start web server<br>  Serial.println(&quot;&quot;);<br>  Serial.println(&quot;WiFi connected.&quot;);<br>  Serial.println(&quot;IP address: &quot;);<br>  Serial.println(WiFi.localIP());<br>  server.begin();<br>}<br><br>void loop(){<br>  WiFiClient client = server.available();   // Listen for incoming clients<br><br>  if (client) {                             // If a new client connects,<br>    currentTime = millis();<br>    previousTime = currentTime;<br>    Serial.println(&quot;New Client.&quot;);          // print a message out in the serial port<br>    String currentLine = &quot;&quot;;                // make a String to hold incoming data from the client<br>    while (client.connected() &amp;&amp; currentTime - previousTime &lt;= timeoutTime) {  // loop while the client&#39;s connected<br>      currentTime = millis();<br>      if (client.available()) {             // if there&#39;s bytes to read from the client,<br>        char c = client.read();             // read a byte, then<br>        Serial.write(c);                    // print it out the serial monitor<br>        header += c;<br>        if (c == &#39;\n&#39;) {                    // if the byte is a newline character<br>          // if the current line is blank, you got two newline characters in a row.<br>          // that&#39;s the end of the client HTTP request, so send a response:<br>          if (currentLine.length() == 0) {<br>            // HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK)<br>            // and a content-type so the client knows what&#39;s coming, then a blank line:<br>            client.println(&quot;HTTP/1.1 200 OK&quot;);<br>            client.println(&quot;Content-type:text/html&quot;);<br>            client.println(&quot;Connection: close&quot;);<br>            client.println();<br><br>            // turns the GPIOs on and off<br>            if (header.indexOf(&quot;GET /26/on&quot;) &gt;= 0) {<br>              Serial.println(&quot;GPIO 26 on&quot;);<br>              output26State = &quot;on&quot;;<br>              digitalWrite(output26, HIGH);<br>            } else if (header.indexOf(&quot;GET /26/off&quot;) &gt;= 0) {<br>              Serial.println(&quot;GPIO 26 off&quot;);<br>              output26State = &quot;off&quot;;<br>              digitalWrite(output26, LOW);<br>            } else if (header.indexOf(&quot;GET /27/on&quot;) &gt;= 0) {<br>              Serial.println(&quot;GPIO 27 on&quot;);<br>              output27State = &quot;on&quot;;<br>              digitalWrite(output27, HIGH);<br>            } else if (header.indexOf(&quot;GET /27/off&quot;) &gt;= 0) {<br>              Serial.println(&quot;GPIO 27 off&quot;);<br>              output27State = &quot;off&quot;;<br>              digitalWrite(output27, LOW);<br>            }<br>            <br>            // Display the HTML web page<br>            client.println(&quot;&lt;!DOCTYPE html&gt;&lt;html&gt;&quot;);<br>            client.println(&quot;&lt;head&gt;&lt;meta name=\&quot;viewport\&quot; content=\&quot;width=device-width, initial-scale=1\&quot;&gt;&quot;);<br>            client.println(&quot;&lt;link rel=\&quot;icon\&quot; href=\&quot;data:,\&quot;&gt;&quot;);<br><br>            // CSS to style the on/off buttons <br>            // Feel free to change the background-color and font-size attributes to fit your preferences<br>            client.println(&quot;&lt;style&gt;html { font-family: Helvetica; display: inline-block; margin: 0px auto; text-align: center;}&quot;);<br>            client.println(&quot;.button { background-color: #4CAF50; border: none; color: white; padding: 16px 40px;&quot;);<br>            client.println(&quot;text-decoration: none; font-size: 30px; margin: 2px; cursor: pointer;}&quot;);<br>            client.println(&quot;.button2 {background-color: #555555;}&lt;/style&gt;&lt;/head&gt;&quot;);<br><br>            // CSS to style the table <br>            client.println(&quot;&lt;style&gt;body { text-align: center; font-family: \&quot;Trebuchet MS\&quot;, Arial;}&quot;);<br>            client.println(&quot;table { border-collapse: collapse; width:35%; margin-left:auto; margin-right:auto; }&quot;);<br>            client.println(&quot;th { padding: 12px; background-color: #0043af; color: white; }&quot;);<br>            client.println(&quot;tr { border: 1px solid #ddd; padding: 12px; }&quot;);<br>            client.println(&quot;tr:hover { background-color: #bcbcbc; }&quot;);<br>            client.println(&quot;td { border: none; padding: 12px; }&quot;);<br>            client.println(&quot;.sensor { color:white; font-weight: bold; background-color: #bcbcbc; padding: 1px; }&quot;);<br>            <br>            // Web Page Heading<br>            client.println(&quot;&lt;/style&gt;&lt;/head&gt;&lt;body&gt;&lt;h1&gt;ESP32 Web Server&lt;/h1&gt;&quot;);<br><br>            // Display current state, and ON/OFF buttons for GPIO 26  <br>            client.println(&quot;&lt;p&gt;GPIO 26 - State &quot; + output26State + &quot;&lt;/p&gt;&quot;);<br>            // If the output26State is off, it displays the ON button       <br>            if (output26State==&quot;off&quot;) {<br>              client.println(&quot;&lt;p&gt;&lt;a href=\&quot;/26/on\&quot;&gt;&lt;button class=\&quot;button\&quot;&gt;ON&lt;/button&gt;&lt;/a&gt;&lt;/p&gt;&quot;);<br>            } else {<br>              client.println(&quot;&lt;p&gt;&lt;a href=\&quot;/26/off\&quot;&gt;&lt;button class=\&quot;button button2\&quot;&gt;OFF&lt;/button&gt;&lt;/a&gt;&lt;/p&gt;&quot;);<br>            }<br><br>            // Display current state, and ON/OFF buttons for GPIO 27  <br>            client.println(&quot;&lt;p&gt;GPIO 27 - State &quot; + output27State + &quot;&lt;/p&gt;&quot;);<br>            // If the output27State is off, it displays the ON button       <br>            if (output27State==&quot;off&quot;) {<br>              client.println(&quot;&lt;p&gt;&lt;a href=\&quot;/27/on\&quot;&gt;&lt;button class=\&quot;button\&quot;&gt;ON&lt;/button&gt;&lt;/a&gt;&lt;/p&gt;&quot;);<br>            } else {<br>              client.println(&quot;&lt;p&gt;&lt;a href=\&quot;/27/off\&quot;&gt;&lt;button class=\&quot;button button2\&quot;&gt;OFF&lt;/button&gt;&lt;/a&gt;&lt;/p&gt;&quot;);<br>            }<br><br>            client.println(&quot;&lt;table&gt;&lt;tr&gt;&lt;th&gt;MEASUREMENT&lt;/th&gt;&lt;th&gt;VALUE&lt;/th&gt;&lt;/tr&gt;&quot;);<br>            client.println(&quot;&lt;tr&gt;&lt;td&gt;Temp. Celsius&lt;/td&gt;&lt;td&gt;&lt;span class=\&quot;sensor\&quot;&gt;&quot;);<br>            client.println(bmp.readTemperature());<br>            client.println(&quot; *C&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&quot;);  <br>            client.println(&quot;&lt;tr&gt;&lt;td&gt;Temp. Fahrenheit&lt;/td&gt;&lt;td&gt;&lt;span class=\&quot;sensor\&quot;&gt;&quot;);<br>            client.println(1.8 * bmp.readTemperature() + 32);<br>            client.println(&quot; *F&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&quot;);       <br>            client.println(&quot;&lt;tr&gt;&lt;td&gt;Pressure&lt;/td&gt;&lt;td&gt;&lt;span class=\&quot;sensor\&quot;&gt;&quot;);<br>            client.println(bmp.readPressure() / 100.0F);<br>            client.println(&quot; hPa&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&quot;);<br>            client.println(&quot;&lt;tr&gt;&lt;td&gt;Approx. Altitude&lt;/td&gt;&lt;td&gt;&lt;span class=\&quot;sensor\&quot;&gt;&quot;);<br>            client.println(bmp.readAltitude(SEALEVELPRESSURE_HPA));<br>            client.println(&quot; m&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&quot;); <br>            client.println(&quot; %&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&quot;); <br>            client.println(&quot;&lt;/body&gt;&lt;/html&gt;&quot;);<br>            <br>            // The HTTP response ends with another blank line<br>            client.println();<br>            // Break out of the while loop<br>            break;<br>          } else { // if you got a newline, then clear currentLine<br>            currentLine = &quot;&quot;;<br>          }<br>        } else if (c != &#39;\r&#39;) {  // if you got anything else but a carriage return character,<br>          currentLine += c;      // add it to the end of the currentLine<br>        }<br>      }<br>    }<br>    // Clear the header variable<br>    header = &quot;&quot;;<br>    // Close the connection<br>    client.stop();<br>    Serial.println(&quot;Client disconnected.&quot;);<br>    Serial.println(&quot;&quot;);<br>  }<br>}</pre><p>3. Open the Arduino IDE’s serial monitor by clicking the search button on the top left corner. Make sure the serial monitor matches your code, if your code says “Serial.begin(115200)”, then choose the 115200 baud. The output should be as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*6Gf4b1vw8dyOyKWi1TNEvw.png" /><figcaption>Serial Monitor</figcaption></figure><p>4. Copy the IP address to your browser. In this case, the IP address is 172.20.10.2. You should see the following page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AM1PfeIpftTLzJv7Mu-UMQ.png" /><figcaption>Website view</figcaption></figure><p>5. If you take a look at the Arduino IDE’s serial monitor, you can see what’s happening. The ESP32 receives an HTTP request from a new client, which is your browser. When you click the ON and OFF green button, the LEDs will turn on or off accordingly. The table underneath it shows the measurement from the BMP280 sensor measured from the condition surrounding it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*ARTqTgOuquAMEEIh5vY1Zw.gif" /><figcaption>Project 8: Web Server</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79dc81ddd547" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ESP32 Project: Bluetooth]]></title>
            <link>https://medium.com/@raniakiranaa15/esp32-project-bluetooth-157f31f0d50c?source=rss-3dda1a44a171------2</link>
            <guid isPermaLink="false">https://medium.com/p/157f31f0d50c</guid>
            <category><![CDATA[bluetooth]]></category>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <dc:creator><![CDATA[Rania Sasi Kirana]]></dc:creator>
            <pubDate>Sun, 26 Mar 2023 13:51:03 GMT</pubDate>
            <atom:updated>2023-04-04T09:41:27.057Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>a step-by-step guide</blockquote><p>Hello! Welcome back to another hands-on project on building an embedded system. This is a story about a project I did in my class, II2260 Embedded System in Bandung Institute of Technology.</p><h4>About this project</h4><p>A wireless network is a computer network that uses electromagnetic or radio waves as a medium to transmit signals. Based on its coverage, wireless networks can be categorized as PAN (Personal Area Network), LAN (Local Area Network), MAN (Metropolitan Area Network), or WAN (Wide Area Network). Generally, PAN is used to connect between one computer device to another. This particular project discusses about one of PAN’s communication protocol, bluetooth. There are two bluetooth technologies discussed, bluetooth classic and bluetooth low energy (BLE). Bluetooth is developed as a way to exchange data over a short range without the need for wires.</p><h4>More on ESP32</h4><p>The ESP32 comes with bluetooth communication feature, both bluetooth classic and BLE, embedded in it. This feature can be used to exchange data between ESP32 and your android smartphone.</p><h4>Step 1: Software Required</h4><p>We’re going to be using Arduino IDE and the ESP32 boards add-on as the programming environment so make sure you’ve installed all of it. If you don’t know where to start, you can check out my step-by-step guide on installing it in my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED Blink</a>.</p><p>You’ll need a Serial Bluetooth Terminal installed in your smartphone. Keep in mind that this application is only available in Google Play Store.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*ohwkb-yPJUPAwIjhWpiGnA.png" /><figcaption>Serial Bluetooth Terminal</figcaption></figure><p>You’ll also need nRF Connect for Mobile application that is also only available in Google Play Store.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*fk1QjObpKDKthmMwGF77sw.png" /></figure><h4>Step 2: Hardware Required</h4><ul><li>DOIT ESP32 DevKit v1</li><li>Breadboard</li><li>USB Cable</li><li>5 mm LED</li><li>330 ohm Resistor</li><li>Jumper wires (male to female, male to male)</li></ul><h4>Step 3: Establish Connection</h4><p>In this project, we’ll try to establish a simple bluetooth connection and exchange data between the ESP32 and your smartphone.</p><ol><li>Connect your ESP32 with your computer using a USB cable.</li><li>Then, you can run the code below to establish a two-way serial bluetooth communication between two devices. If you don’t know how to run a code yet, you can simply check out my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED Blink</a> as I’ve explained the step-by-step process on selecting the right board and port to connect the ESP32 to your computer and running the program.</li></ol><p>The code is also available on your Arduino IDE. Open File &gt; Examples &gt; BluetoothSerial &gt; SerialToSerialBT</p><pre>//This example code is in the Public Domain (or CC0 licensed, at your option.)<br>//By Evandro Copercini - 2018<br>//<br>//This example creates a bridge between Serial and Classical Bluetooth (SPP)<br>//and also demonstrate that SerialBT have the same functionalities of a normal Serial<br><br>#include &quot;BluetoothSerial.h&quot;<br><br>#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)<br>#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it<br>#endif<br><br>BluetoothSerial SerialBT;<br><br>void setup() {<br>  Serial.begin(115200);<br>  SerialBT.begin(&quot;ESP32test&quot;); //Bluetooth device name<br>  Serial.println(&quot;The device started, now you can pair it with bluetooth!&quot;);<br>}<br><br>void loop() {<br>  if (Serial.available()) {<br>    SerialBT.write(Serial.read());<br>  }<br>  if (SerialBT.available()) {<br>    Serial.write(SerialBT.read());<br>  }<br>  delay(20);<br>}</pre><p>3. Open the serial monitor by clicking the search button on the top left corner. Make sure the serial monitor matches your code, if your code says “Serial.begin(115200)”, then choose the 115200 baud. The output should be as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lkde_T0qaiZF3iF41NviWg.png" /></figure><p>This output indicates the connection between the two devices is established and ready to be paired with your android smartphone.</p><p>4. Make sure you’ve enabled your smartphone’s bluetooth. Open the serial bluetooth terminal application that you’ve installed on your android smartphone. Go to Devices. Press the three dots symbol on the top right corner. Then, choose Android bluetooth settings &gt; ESP32test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*kuArHQ0dFCNZfSemM7yUhw.png" /></figure><p>If you have successfully connected your android smartphone with ESP32, the output will be shown as below in the serial bluetooth terminal application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*kp-GP5iDdpg4UrUo-1EqAQ.png" /></figure><p>5. Then, try typing something in the serial bluetooth terminal application and send it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*UvDhnafcckLmVTaJtgudZw.png" /></figure><p>The message that you typed in the serial bluetooth terminal application will appear on your Arduino IDE’s serial monitor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ITJE1VbgstHzcV2tEUdhrg.png" /></figure><p>6. You can also try doing it the other way. Type something on your Arduino IDE’s serial monitor and click enter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cG33LkyoVQRvo5cbbFwbkg.png" /></figure><p>The message should appear in the serial bluetooth terminal application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*0zBHG3kmqAovNi6V-l8p1g.png" /></figure><h4>Project 1: Bluetooth Classic</h4><p>In this project, I will try to control the ESP32 outputs when receiving a certain message. How this works is when I send a message from the serial bluetooth terminal application, the LED will either turn on or off according to the message. If I send “ON”, the LED will turn on. If I send “OFF”, the LED will turn off.</p><ol><li>Connect the ESP32 with a LED and a resistor using jumper wires.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vo5BOCATBi4BWRvDUfOVDA.png" /><figcaption>Project 1: Bluetooth Classic (Circuit)</figcaption></figure><p>2. Run the code below in your Arduino IDE.</p><pre>/*********<br>  Rui Santos<br>  Complete project details at https://randomnerdtutorials.com<br>*********/<br><br>// Load libraries<br>#include &quot;BluetoothSerial.h&quot;<br><br>// Check if Bluetooth configs are enabled<br>#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)<br>#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it<br>#endif<br><br>// Bluetooth Serial object<br>BluetoothSerial SerialBT;<br><br>// GPIO where LED is connected to<br>const int ledPin =  21;<br><br>// Handle received and sent messages<br>String message = &quot;&quot;;<br><br>void setup() {<br>  pinMode(ledPin, OUTPUT);<br>  Serial.begin(115200);<br>  // Bluetooth device name<br>  SerialBT.begin(&quot;ESP32test&quot;);<br>  Serial.println(&quot;The device started, now you can pair it with bluetooth!&quot;);<br>}<br><br>void loop() {<br>  // Read received messages (LED control command)<br>  if (SerialBT.available()){<br>    char incomingChar = SerialBT.read();<br>    if (incomingChar != &#39;\n&#39;){<br>      message += String(incomingChar);<br>    }<br>    else{<br>      message = &quot;&quot;;<br>    }<br>    Serial.write(incomingChar);  <br>  }<br>  // Check received message and control output accordingly<br>  if (message ==&quot;ON&quot;){<br>    digitalWrite(ledPin, HIGH);<br>  }<br>  else if (message ==&quot;OFF&quot;){<br>    digitalWrite(ledPin, LOW);<br>  }<br>  delay(20);<br>}</pre><p>3. To test whether this project works or not, try typing “ON” and send the message in the serial bluetooth terminal application. The LED should turn ON. If you send the message “OFF”, the LED should turn off.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*XRgywuggvseED-31Eo87Uw.gif" /><figcaption>The Finished Project</figcaption></figure><h4>Project 2: Bluetooth Low Energy (BLE)</h4><ol><li>Run the code below in Arduino IDE. The code is also available on your Arduino IDE. Go to File &gt; Examples &gt;ESP32 BLE Arduino &gt; BLE_server.</li></ol><pre>/*<br>    Based on Neil Kolban example for IDF: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleServer.cpp<br>    Ported to Arduino ESP32 by Evandro Copercini<br>    updates by chegewara<br>*/<br><br>#include &lt;BLEDevice.h&gt;<br>#include &lt;BLEUtils.h&gt;<br>#include &lt;BLEServer.h&gt;<br><br>// See the following for generating UUIDs:<br>// https://www.uuidgenerator.net/<br><br>#define SERVICE_UUID        &quot;4fafc201-1fb5-459e-8fcc-c5c9c331914b&quot;<br>#define CHARACTERISTIC_UUID &quot;beb5483e-36e1-4688-b7f5-ea07361b26a8&quot;<br><br>void setup() {<br>  Serial.begin(115200);<br>  Serial.println(&quot;Starting BLE work!&quot;);<br><br>  BLEDevice::init(&quot;Rania Sasi Kirana&quot;);<br>  BLEServer *pServer = BLEDevice::createServer();<br>  BLEService *pService = pServer-&gt;createService(SERVICE_UUID);<br>  BLECharacteristic *pCharacteristic = pService-&gt;createCharacteristic(<br>                                         CHARACTERISTIC_UUID,<br>                                         BLECharacteristic::PROPERTY_READ |<br>                                         BLECharacteristic::PROPERTY_WRITE<br>                                       );<br><br>  pCharacteristic-&gt;setValue(&quot;Hello, my name is Sasi :D&quot;);<br>  pService-&gt;start();<br>  // BLEAdvertising *pAdvertising = pServer-&gt;getAdvertising();  // this still is working for backward compatibility<br>  BLEAdvertising *pAdvertising = BLEDevice::getAdvertising();<br>  pAdvertising-&gt;addServiceUUID(SERVICE_UUID);<br>  pAdvertising-&gt;setScanResponse(true);<br>  pAdvertising-&gt;setMinPreferred(0x06);  // functions that help with iPhone connections issue<br>  pAdvertising-&gt;setMinPreferred(0x12);<br>  BLEDevice::startAdvertising();<br>  Serial.println(&quot;Characteristic defined! Now you can read it in your phone!&quot;);<br>}<br><br>void loop() {<br>  // put your main code here, to run repeatedly:<br>  delay(2000);<br>}</pre><p>2. Open the nRF Connect for Mobile application in your android smartphone. Then, tap the scanner button to scan for nearby devices. There should be an ESP32 with the name “Rania Sasi Kirana”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*wrXfmDPzOWCu8XDgwdAJpA.png" /></figure><p>3. Click the Connect button. If you tap the service, it will show the characteristic with the UUID that you’ve defined in the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*jgXqKVNqdyK0_XN7lEF5Dg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=157f31f0d50c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ESP32 Project: Serial Communication]]></title>
            <link>https://medium.com/@raniakiranaa15/esp32-project-serial-communication-ef796e16a21e?source=rss-3dda1a44a171------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef796e16a21e</guid>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[serial-communication]]></category>
            <dc:creator><![CDATA[Rania Sasi Kirana]]></dc:creator>
            <pubDate>Sun, 19 Mar 2023 15:26:55 GMT</pubDate>
            <atom:updated>2023-04-04T10:12:37.655Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>a step-by-step guide</blockquote><p>Hello and welcome back! Let me reintroduce myself, my name is Rania Sasi Kirana and this is a story about a project I did in my class, II2260 Embedded System in Bandung Institute of Technology. If you’re new here, kindly check out my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED blink</a>.</p><h4>About this project</h4><p>This project experiments on the ESP32&#39;s ability to connect multiple I2C devices to the same ESP32’s bus and how to use the I2C bus interfaces. Data communications is important in order to enable data exchange with other devices. I2C or Inter-Integrated Circuit is a half duplex protocol where serial data transmission is used for short distance between boards, modules, and peripherals.</p><h4>More on ESP32</h4><p>ESP32 has two I2C bus interfaces that can serve as I2C master or slave. With multi-master, multi-slave communication protocol, the connection can be multiple slaves to one master or multiple masters controlling the same slave. One of the example of multiple masters controlling the same project is two ESP32 boards writing data to the same LCD with I2C adapter. However, in this project, the connection will be multiple slaves to one master, where the slaves are BMP280 sensor and LCD with I2C adapter and the master is ESP32. The ESP32 reads measurement from the BMP280 sensor using I2C and writes the sensor readings in the LCD with I2C adapter.</p><h4>Step 1: Software Required</h4><p>Before we start, make sure you’ve installed Arduino IDE and the ESP32 boards add-on as we will program the ESP32 using Arduino IDE. If you haven’t installed it yet, don’t worry because I did a step-by-step guide on installing it in my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED Blink</a>.</p><h4>Step 2: Hardware Required</h4><ul><li>DOIT ESP32 DevKit v1</li><li>BMP280 Sensor</li><li>LCD with I2C Adapter</li><li>Breadboard</li><li>Jumper wires</li><li>USB Cable</li></ul><h4>Step 3: Serial Communication</h4><ol><li>Assemble the circuit below using ESP32, BMP280 Sensor, LCD with I2C adapter, breadboard, and jumper wires.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O5M4yhtf24VR2N1oPR7zRQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LjkbSk0hgjGG3FHAbfmjXg.jpeg" /><figcaption>Project 6: Serial Communication (Circuit)</figcaption></figure><p>2. Copy the code below and run it through Arduino IDE. If you don’t know how to run a code yet, you can simply check out my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED Blink</a> as I’ve explained the step-by-step process on selecting the right board and port to connect the ESP32 to your computer and running the program.</p><pre>#include &lt;Wire.h&gt;<br>#include &lt;SPI.h&gt;<br>#include &lt;Adafruit_BMP280.h&gt;<br>#include &lt;LiquidCrystal_I2C.h&gt;<br><br>int lcdColumns = 16; // jumlah kolom LCD<br>int lcdRows = 2; // jumlah baris LCD<br>// inialisasi LCD dengan LCD address yang sesuai<br>LiquidCrystal_I2C lcd(0x27, lcdColumns, lcdRows);<br><br>Adafruit_BMP280 bmp; // I2C<br><br>void setup() {<br>  Serial.begin(115200);<br>  unsigned status = bmp.begin(0x76);  <br>  if (!status) {<br>    Serial.println(&quot;Could not find a valid BMP280 sensor, check wiring or try a different address&quot;);<br>    while (1);<br>  }<br><br>  // Initialize LCD<br>  lcd.init();      <br>  // turn on LCD backlight           <br>  lcd.backlight();<br>}<br><br>void loop() {<br>  // temperature<br>  // set cursor to first column, first row<br>  lcd.setCursor(0,0);<br>  lcd.print(&quot;Temperature: &quot;);<br>  lcd.print(String(bmp.readTemperature()));<br>  lcd.print(&quot; Celcius&quot;);<br><br>  // pressure<br>  // set cursor to first column, second row<br>  lcd.setCursor(0,1);<br>  lcd.print(&quot;Pressure: &quot;);<br>  lcd.print(String(bmp.readPressure()));<br>  lcd.print(&quot; Pa&quot;); <br>  <br>  // delay 2 detik sblm mengukur kembali<br>  delay(2000);<br>}</pre><p>3. The ESP32 will read measurement from the BMP280 sensor using I2C and write the sensor readings in the LCD with I2C adapter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*w80Uzrp_BMzOD7v1FVR3Gw.gif" /><figcaption>The Finished Project</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef796e16a21e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ESP32 Project: Output — Display & PWM]]></title>
            <link>https://medium.com/@raniakiranaa15/esp32-project-output-display-pwm-a30ca2d705b0?source=rss-3dda1a44a171------2</link>
            <guid isPermaLink="false">https://medium.com/p/a30ca2d705b0</guid>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[lcd]]></category>
            <category><![CDATA[pwm]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <dc:creator><![CDATA[Rania Sasi Kirana]]></dc:creator>
            <pubDate>Sat, 11 Mar 2023 18:30:07 GMT</pubDate>
            <atom:updated>2023-03-11T18:34:30.525Z</atom:updated>
            <content:encoded><![CDATA[<h3>ESP32 Project: Output — Display &amp; PWM</h3><blockquote>a step-by-step guide</blockquote><p>Welcome back to another ESP32 project. This project is about Output (Display) and PWM using ESP32. Anyways, this is a step-by-step guide and a story about a project I did in my class, II2260 Embedded System in Bandung Institute of Technology.</p><h4>About this project</h4><p>The output of an embedded system is commonly used for either monitoring purposes or controlling purposes. As a monitoring device, a display is used to show information from the embedded system and as a controlling device, it is associated with motors and their control system circuits. In this project, I’m going to use LCD (Liquid-Crystal Display) and ESP32 PWM (Pulse Width Modulation).</p><h4>More on ESP32 and LCD</h4><p>LCD has a power supply voltage of 5 volt, allowing it to be able to connect directly to the ESP32, specifically to the VIN pin of the ESP, as it falls within the voltage range an ESP32 can handle. I used LCD with the help of I2C adapter. The I2C adapter has a built-in potentiometer that can adjust the LCD contrast, a chip that can handle 16x2 and 20x4 displays, and a jumper for turning on and off the backlight of the display.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*R5WsS2I7UG4Ve8yE" /><figcaption>I2C Adapter Module</figcaption></figure><p>PWM (Pulse Width Modulation) is a technique used to get an analog signal from a digital system and is used to control LED’s brightness, DC’s motor speed, and servo motor. ESP32 board has 16 independent channels of PWM controller output, in any GPIO pin.</p><h4>Step 1: Software Required</h4><p>We’re going to be using Arduino IDE and the ESP32 boards add-on as the programming environment so make sure you’ve installed all of it. If you don’t know where to start, you can check out my step-by-step guide on installing it in my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED Blink</a>.</p><p>Since we’re going to be using Liquid-Crystal Display (LCD) with an I2C adapter, we’re going to need to install the library first.</p><ol><li><a href="https://github.com/marcoschwartz/LiquidCrystal_I2C/archive/master.zip">Click here</a> to download the LCD I2C library (.zip folder).</li><li>Unzip the folder and rename your folder to <strong>LiquidCrystal_I2C</strong>.</li><li>Move the folder to your Arduino IDE <strong>libraries</strong> folder.</li></ol><p>You should already have the library in your Arduino IDE and use it to program the LCD I2C.</p><h4>Step 2: Hardware Required</h4><ul><li>DOIT ESP32 DevKit v1</li><li>Breadboard</li><li>USB Cable</li><li>5 mm LED</li><li>330 ohm Resistor</li><li>Jumper wires (male to female)</li><li>LCD with I2C adapter</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*90bHW0QQuUdwm-G-.jpg" /><figcaption>LCD (soldered with I2C adapter)</figcaption></figure><h4>Project 1: Liquid-Crystal Display (LCD)</h4><ol><li>You can recreate the diagram below.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*3AI_8cpEFbMnxnkDLSUmug.png" /><figcaption>Project 1 Diagram</figcaption></figure><p>2. Copy the code below and run it through Arduino IDE to get the I2C address. If you don’t know how to run a code yet, you can simply check out my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED Blink</a> as I’ve explained the step-by-step process on selecting the right board and port to connect the ESP32 to your computer and running the program.</p><pre>/*********<br>  Rui Santos<br>  Complete project details at https://randomnerdtutorials.com  <br>*********/<br><br>#include &lt;Wire.h&gt;<br> <br>void setup() {<br>  Wire.begin();<br>  Serial.begin(115200);<br>  Serial.println(&quot;\nI2C Scanner&quot;);<br>}<br> <br>void loop() {<br>  byte error, address;<br>  int nDevices;<br>  Serial.println(&quot;Scanning...&quot;);<br>  nDevices = 0;<br>  for(address = 1; address &lt; 127; address++ ) {<br>    Wire.beginTransmission(address);<br>    error = Wire.endTransmission();<br>    if (error == 0) {<br>      Serial.print(&quot;I2C device found at address 0x&quot;);<br>      if (address&lt;16) {<br>        Serial.print(&quot;0&quot;);<br>      }<br>      Serial.println(address,HEX);<br>      nDevices++;<br>    }<br>    else if (error==4) {<br>      Serial.print(&quot;Unknow error at address 0x&quot;);<br>      if (address&lt;16) {<br>        Serial.print(&quot;0&quot;);<br>      }<br>      Serial.println(address,HEX);<br>    }    <br>  }<br>  if (nDevices == 0) {<br>    Serial.println(&quot;No I2C devices found\n&quot;);<br>  }<br>  else {<br>    Serial.println(&quot;done\n&quot;);<br>  }<br>  delay(5000);          <br>}</pre><p>Open the serial monitor by clicking the search button on the top left corner. Make sure the serial monitor matches your code, if your code says “Serial.begin(115200)”, then choose the 115200 baud. The output should be as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xiHxeb75nQkH1pRxsF_MrQ.png" /><figcaption>Output LCD address</figcaption></figure><p>The output shows that the I2C address is 0x27. If the output shows “No I2C devices found”, recheck your circuit in case missed a step while building the circuit.</p><p>3. The code below will display a static text on the first row and second row on the LCD.</p><pre>#include &lt;LiquidCrystal_I2C.h&gt;<br>// set the LCD number of columns and rows<br>int lcdColumns = 16; // this shows how many columns LCD has<br>int lcdRows = 2; // while this is how many rows LCD has<br>// set LCD address, number of columns and rows<br>// if you don&#39;t know your display address, run an I2C scanner sketch<br>LiquidCrystal_I2C lcd(0x27, lcdColumns, lcdRows);<br>void setup(){<br>  // initialize LCD<br>  lcd.init();<br>  // turn on LCD backlight                      <br>  lcd.backlight();<br>}<br>void loop(){<br>  // set cursor to first column, first row<br>  lcd.setCursor(0, 0);<br>  // print message<br>  lcd.print(&quot;Rania Sasi Kirana&quot;);<br>  delay(2000);<br>  // clears the display to print new message<br>  lcd.clear();<br>  // set cursor to fifth column, second row<br>  lcd.setCursor(4,1);<br>  lcd.print(&quot;18221168&quot;);<br>  delay(2000);<br>  lcd.clear(); <br>}</pre><p>If you happen to encounter the <strong>warning </strong>below when running the code, you can just ignore it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yoRM3GLPsq0xSFG5Gm5s5A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*IP3tGp2JUmY2YsRQ6qZM3A.gif" /><figcaption>Project 1: Static Text on LCD</figcaption></figure><p>4. The code below will display scrolling text on the first row and static text on the second row on the LCD.</p><pre>#include &lt;LiquidCrystal_I2C.h&gt;<br><br>// set the LCD number of columns and rows<br>int lcdColumns = 16;<br>int lcdRows = 2;<br><br>// set LCD address, number of columns and rows<br>// if you don&#39;t know your display address, run an I2C scanner sketch<br>LiquidCrystal_I2C lcd(0x27, lcdColumns, lcdRows);  <br><br>// Function to scroll text<br>// The function acepts the following arguments:<br>// row: row number where the text will be displayed<br>// message: message to scroll<br>// delayTime: delay between each character shifting<br>// lcdColumns: number of columns of your LCD<br>void scrollText(int row, String message, int delayTime, int lcdColumns) {<br>  for (int i=0; i &lt; lcdColumns; i++) {<br>    message = &quot; &quot; + message;  <br>  } <br>  message = message + &quot; &quot;; <br>  for (int pos = 0; pos &lt; message.length(); pos++) {<br>    lcd.setCursor(0, row);<br>    lcd.print(message.substring(pos, pos + lcdColumns));<br>    delay(delayTime);<br>  }<br>}<br><br>void setup(){<br>  // initialize LCD<br>  lcd.init();<br>  // turn on LCD backlight                      <br>  lcd.backlight();<br>}<br><br>void loop(){<br>  // set cursor to first column, first row<br>  lcd.setCursor(0, 1);<br>  // print static message<br>  lcd.print(&quot;Rania Sasi Kirana&quot;);<br>  // print scrolling message<br>  scrollText(0, &quot;ESP32 Project: Display &amp; Actuator&quot;, 250, lcdColumns);<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*J-L4ZmXxvPz6xxDWhFgxFQ.gif" /><figcaption>Project 1: Scrolling text on LCD</figcaption></figure><p>5. The code below will display custom character, specifically a heart, on every column on the first row of the LCD. You can display any custom character you want, then convert it to a byte variable in c++ code. You can <a href="https://omerk.github.io/lcdchargen/">click here</a> to generate the code for your character.</p><pre>/*********<br>  Rui Santos<br>  Complete project details at https://randomnerdtutorials.com  <br>*********/<br><br>#include &lt;LiquidCrystal_I2C.h&gt;<br><br>// set the LCD number of columns and rows<br>int lcdColumns = 16;<br>int lcdRows = 2;<br><br>// set LCD address, number of columns and rows<br>// if you don&#39;t know your display address, run an I2C scanner sketch<br>LiquidCrystal_I2C lcd(0x27, lcdColumns, lcdRows);  <br><br>byte heart[8] = {<br>  0b00000,<br>  0b01010,<br>  0b11111,<br>  0b11111,<br>  0b11111,<br>  0b01110,<br>  0b00100,<br>  0b00000<br>};<br><br>void setup(){<br>  // initialize LCD<br>  lcd.init();<br>  // turn on LCD backlight                      <br>  lcd.backlight();<br>  // create character heart<br>  lcd.createChar(0, heart);<br>}<br><br>void loop(){<br>  // set cursor to fourth column, second row<br>  lcd.setCursor(3,1);<br>  lcd.print(&quot;I LOVE YOU&quot;);<br>  <br>  // set cursor to first column, first row<br>  for (int i = 0; i &lt; lcdColumns; i++){<br>    lcd.setCursor(i, 0);<br>    lcd.write(0);<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ESFEpcAqaDHeJwju_ExUmA.png" /><figcaption>Project 1: Custom Characters</figcaption></figure><p>Please note that one block in LCD only can show a character with at most 5x8 pixels. The LCD has a total of 32 blocks. Now the problem with the LCD is you can’t create a picture with too many details on it because it displays characters using only at most 5x8 pixels. If you want to create a picture with tiny details, you can try using an OLED display.</p><h4>Project 1: Problems</h4><p>When I first tried it, the LCD only lights up but no text was shown on the LCD. Turns out, it’s because I needed to adjust the LCD contrast. To do this, all you have to do is turn the built-in potentiometer on the I2C adapter. If you don’t use the help of the I2C adapter, you’re going to need to add a potentiometer to adjust the LCD contrast.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*C-lxoOYMblXybBlgHTUOJg.png" /><figcaption>Adjust the potentiometer on the I2C adapter</figcaption></figure><h4>Project 2 (Bonus): ESP32 PWM Controller</h4><p>For the bonus project, I built a circuit that dims LED using the LED PWM (Pulse Width Modulation) controller of the ESP32. I built the circuit using two LEDs, two 330 ohm resistors, ESP32, and jumper wires.</p><p>I build a simple circuit of LED and resistor and connect it to the ESP32’s GPIO pins. You can use any of the ESP32’s GPIO pins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eKv_bZRxm_neDumW.png" /><figcaption>ESP32 Pins</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YRSU3hrIQNEMH2iaBPquwQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pU6Bpg-EzmMz4qvNWYcIvQ.jpeg" /><figcaption>Project 2 (Bonus): Circuit</figcaption></figure><p>Then, copy the code below and run the program.</p><pre>// the number of the LED pin<br>const int ledPin1 = 21; // 21 corresponds to GPIO21<br>const int ledPin2 = 22; // 22 corresponds to GPIO22<br>// setting PWM properties<br>const int freq = 5000;<br>const int ledChannel = 0;<br>const int resolution = 8;<br> <br>void setup(){<br> // configure LED PWM functionalitites<br> ledcSetup(ledChannel, freq, resolution);<br> <br> // attach the channel to the GPIO to be controlled<br> ledcAttachPin(ledPin1, ledChannel);<br> ledcAttachPin(ledPin2, ledChannel);<br>}<br> <br>void loop(){<br> // increase the LED brightness<br> for(int dutyCycle = 0; dutyCycle &lt;= 255; dutyCycle++){ <br> // changing the LED brightness with PWM<br> ledcWrite(ledChannel, dutyCycle);<br> delay(15);<br> }<br>// decrease the LED brightness<br> for(int dutyCycle = 255; dutyCycle &gt;= 0; dutyCycle--){<br> // changing the LED brightness with PWM<br> ledcWrite(ledChannel, dutyCycle); <br> delay(15);<br> }<br>}</pre><p>Basically, what the program means is that the PWM controller will increase the LED brightness slowly then decrease it on a loop. This shows that using PWM controller, we can control other outputs by giving a signal to the right properties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*J5N4JUXDbNVap_59BvPoKQ.gif" /><figcaption>Project 2: The finished project</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a30ca2d705b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ESP32 Project: External Sensor (BMP280 Sensor)]]></title>
            <link>https://medium.com/@raniakiranaa15/esp32-project-external-sensor-bmp280-f364dc1bc683?source=rss-3dda1a44a171------2</link>
            <guid isPermaLink="false">https://medium.com/p/f364dc1bc683</guid>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[bm280]]></category>
            <dc:creator><![CDATA[Rania Sasi Kirana]]></dc:creator>
            <pubDate>Mon, 27 Feb 2023 07:31:50 GMT</pubDate>
            <atom:updated>2023-03-05T06:52:26.751Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>a step-by-step guide</blockquote><p>Hello! My name is Rania Sasi Kirana and this is a story about a project I did in my class, II2260 Embedded System in Bandung Institute of Technology. If you’ve seen my first two article on ESP32 Project, welcome back! If you haven’t, kindly check out <a href="https://medium.com/@raniakiranaa15">my profile</a> for more ESP32 Projects.</p><h4>About this project</h4><p>Sensors are devices that read environmental condition, where natural quantities are sensed by sensors and converted into electrical quantities. On my previous project, ESP32 Project: Sensor and Perception, I did a project on built-in sensors on ESP32. This project’s objective is to connect external sensor to our embedded system, specifically BMP280 sensor. BMP280 sensor can be used to measure temperature, pressure, and humidity.</p><h4>More on ESP32</h4><p>There are all kinds of sensor that can be connected to the embedded system, to measure distance, volume, position, weight, and others. For ESP32, external sensors that can be connected should be within the suitable level of voltage, which is 3.3 Volt. If you want to use a higher level of voltage, like Arduino Sensor (5 Volt), you can use an extra component (logic converter) to convert the voltage between the sensor and the microcontroller.</p><h4>Step 1: Software Required</h4><p>We’re going to be using Arduino IDE and the ESP32 boards add-on as the programming environment so make sure you’ve installed all of it. If you don’t know where to start, you can check out my step-by-step guide on installing it in my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED Blink</a>.</p><h4>Step 2: Hardware Required</h4><ul><li>DOIT ESP32 DevKit v1</li><li>Breadboard</li><li>USB Cable</li><li>5 mm LED</li><li>10k ohm Resistor</li><li>Jumper wires (male to male &amp; male to female)</li><li>BMP280 Sensor</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/1*stPf0FtKGzAeZ918sAr-YA.png" /><figcaption>BMP280 Sensor</figcaption></figure><p>After you’ve prepared and set up the required software and hardware for this project, you can go ahead and start the project.</p><h4>Step 3: Onto the Next Step</h4><ol><li>Open Arduino IDE, then open Tools &gt; Manage Libraries… &gt; type adfruit bmp280 in the search column &gt; Install &gt; Install All to download the BMP280 sensor library.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XZ-MLtJoFupAjhFVKpgByQ.png" /><figcaption>download bmp280 sensor library</figcaption></figure><p>2. For the circuit, to connect the BMP280 sensor to ESP32 using jumper wires. Connect each pins accordingly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bpzNEucFa8zUgxq1y0EiRA.png" /><figcaption>ESP32 Project: BMP280 Sensor</figcaption></figure><p>3. To test if the sensor is working and connected to the ESP32, you can run a code. You can just copy the code below, upload and verify it on your Arduino IDE.</p><pre>#include &lt;Wire.h&gt;<br>#include &lt;SPI.h&gt;<br>#include &lt;Adafruit_BMP280.h&gt;<br><br>#define BMP_SCK  (13)<br>#define BMP_MISO (12)<br>#define BMP_MOSI (11)<br>#define BMP_CS   (10)<br><br>Adafruit_BMP280 bmp; // I2C<br>//Adafruit_BMP280 bmp(BMP_CS); // hardware SPI<br>//Adafruit_BMP280 bmp(BMP_CS, BMP_MOSI, BMP_MISO,  BMP_SCK);<br><br>void setup() {<br>  Serial.begin(115200);<br>  while ( !Serial ) delay(100);   // wait for native usb<br>  Serial.println(F(&quot;BMP280 test&quot;));<br>  unsigned status;<br>  //status = bmp.begin(BMP280_ADDRESS_ALT, BMP280_CHIPID);<br>  status = bmp.begin(0x76);<br>  if (!status) {<br>    Serial.println(F(&quot;Could not find a valid BMP280 sensor, check wiring or &quot;<br>                      &quot;try a different address!&quot;));<br>    Serial.print(&quot;SensorID was: 0x&quot;); Serial.println(bmp.sensorID(),16);<br>    Serial.print(&quot;        ID of 0xFF probably means a bad address, a BMP 180 or BMP 085\n&quot;);<br>    Serial.print(&quot;   ID of 0x56-0x58 represents a BMP 280,\n&quot;);<br>    Serial.print(&quot;        ID of 0x60 represents a BME 280.\n&quot;);<br>    Serial.print(&quot;        ID of 0x61 represents a BME 680.\n&quot;);<br>    while (1) delay(10);<br>  }<br><br>  /* Default settings from datasheet. */<br>  bmp.setSampling(Adafruit_BMP280::MODE_NORMAL,     /* Operating Mode. */<br>                  Adafruit_BMP280::SAMPLING_X2,     /* Temp. oversampling */<br>                  Adafruit_BMP280::SAMPLING_X16,    /* Pressure oversampling */<br>                  Adafruit_BMP280::FILTER_X16,      /* Filtering. */<br>                  Adafruit_BMP280::STANDBY_MS_500); /* Standby time. */<br>}<br><br>void loop() {<br>    Serial.print(F(&quot;Temperature = &quot;));<br>    Serial.print(bmp.readTemperature());<br>    Serial.println(&quot; *C&quot;);<br><br>    Serial.print(F(&quot;Pressure = &quot;));<br>    Serial.print(bmp.readPressure());<br>    Serial.println(&quot; Pa&quot;);<br><br>    Serial.print(F(&quot;Approx altitude = &quot;));<br>    Serial.print(bmp.readAltitude(1013.25)); /* Adjusted to local forecast! */<br>    Serial.println(&quot; m&quot;);<br><br>    Serial.println();<br>    delay(2000);<br>}</pre><p>On a side note, if you’re having trouble selecting the right board and port, uploading, or verifying, you can check out my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED Blink</a> as I’ve explained the step-by-step process on selecting the right board and port to connect the ESP32 to your computer and running the program.</p><p>4. Then, open the serial monitor by clicking the search button on the top left corner. Make sure the serial monitor matches your code, if your code says “Serial.begin(115200)”, then choose the 115200 baud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*cx004PKmhdkfKzEgj_x2gg.png" /><figcaption>Output on the serial monitor when the sensor is not touched</figcaption></figure><p>You can see on the picture above, when I haven’t touched the sensor, the sensor still measures room temperature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*kF40AjS9hcM1PpyiEF-a_Q.png" /><figcaption>Output on the serial monitor when the sensor is touched</figcaption></figure><p>When I touched the sensor, the temperature slowly went up according to my body temperature. When I released it, the temperature slowly went down according to the room temperature. This happened because the BMP280 sensor can be used to measure temperature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*p04Oyb8slTQcUFCfHWHSgA.gif" /><figcaption>ESP32 Project: BMP280 Sensor</figcaption></figure><h4>Step 4: What if it didn’t work?</h4><p>This project didn’t work the first time I tried it. Then I found out that it’s because I connected the wrong end pins to the ESP32. Make sure when you connect the sensor with the ESP32 that you match the pins accordingly.</p><h4>Bonus Project: LED</h4><p>For the bonus project, I tried adding two components to the circuit, an LED and a 10k resistor. The idea is that when the temperature that the sensor measured reach a certain point, the LED will turn on. When it is below the temperature limit I’ve set in my code, then the LED will turn off.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4l4yMcMmcKbwmY9uPWDjiQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M-1ymhJQUOzLiNyZL0lz9w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3yZswh8BxR0qJzo9YNfHXQ.jpeg" /><figcaption>Bonus Project: BM280 Sensor</figcaption></figure><pre>#include &lt;Wire.h&gt;<br>//#include &lt;SPI.h&gt;<br>#include &lt;Adafruit_BMP280.h&gt;<br><br>//#define BMP_SCK  (13)<br>//#define BMP_MISO (12)<br>//#define BMP_MOSI (11)<br>//#define BMP_CS   (10)<br><br>Adafruit_BMP280 bmp; // I2C<br>//Adafruit_BMP280 bmp(BMP_CS); // hardware SPI<br>//Adafruit_BMP280 bmp(BMP_CS, BMP_MOSI, BMP_MISO,  BMP_SCK);<br>const int LED = 23;<br><br>void setup() {<br>  Serial.begin(115200);<br>  while ( !Serial ) delay(100);   // wait for native usb<br>  Serial.println(F(&quot;BMP280 test&quot;));<br>  unsigned status;<br>  //status = bmp.begin(BMP280_ADDRESS_ALT, BMP280_CHIPID);<br>  status = bmp.begin(0x76);<br>  if (!status) {<br>    Serial.println(F(&quot;Could not find a valid BMP280 sensor, check wiring or &quot;<br>                      &quot;try a different address!&quot;));<br>    Serial.print(&quot;SensorID was: 0x&quot;); Serial.println(bmp.sensorID(),16);<br>    Serial.print(&quot;        ID of 0xFF probably means a bad address, a BMP 180 or BMP 085\n&quot;);<br>    Serial.print(&quot;   ID of 0x56-0x58 represents a BMP 280,\n&quot;);<br>    Serial.print(&quot;        ID of 0x60 represents a BME 280.\n&quot;);<br>    Serial.print(&quot;        ID of 0x61 represents a BME 680.\n&quot;);<br>    while (1);<br>  }<br><br>  /* Default settings from datasheet. */<br>  bmp.setSampling(Adafruit_BMP280::MODE_NORMAL,     /* Operating Mode. */<br>                  Adafruit_BMP280::SAMPLING_X2,     /* Temp. oversampling */<br>                  Adafruit_BMP280::SAMPLING_X16,    /* Pressure oversampling */<br>                  Adafruit_BMP280::FILTER_X16,      /* Filtering. */<br>                  Adafruit_BMP280::STANDBY_MS_500); /* Standby time. */<br>                  pinMode(LED, OUTPUT);<br>}<br><br>void loop() {<br>    Serial.print(F(&quot;Temperature = &quot;));<br>    Serial.print(bmp.readTemperature());<br>    Serial.println(&quot; *C&quot;);<br><br>    Serial.print(F(&quot;Pressure = &quot;));<br>    Serial.print(bmp.readPressure());<br>    Serial.println(&quot; Pa&quot;);<br><br>    Serial.print(F(&quot;Approx altitude = &quot;));<br>    Serial.print(bmp.readAltitude(1013.25)); /* Adjusted to local forecast! */<br>    Serial.println(&quot; m&quot;);<br><br>    if (bmp.readTemperature()&gt;= 28){<br>      digitalWrite(LED, HIGH);<br>      Serial.println(&quot;LED ON...&quot;);<br>    } else {<br>      digitalWrite(LED, LOW);<br>      Serial.println(&quot;LED OFF...&quot;);<br>    }<br><br>    Serial.println();<br>    delay(2000);<br>}</pre><p>I used the code from the previous project and added a few conditions. I set the temperature limit to 28 degrees Celsius. If the temperature the sensor measured falls below 28 degrees Celsius, the LED will stay off. If the temperature reaches 28 degrees Celsius or above, the LED will turn on and stay on until the temperature falls below 28 degrees Celsius.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*3ftDNGVmNoiusij-M92huA.gif" /><figcaption>Bonus Project: BMP280 Sensor and LED</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f364dc1bc683" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ESP32 Project: Sensor and Perception]]></title>
            <link>https://medium.com/@raniakiranaa15/esp32-project-sensor-and-perception-448ec8114d5d?source=rss-3dda1a44a171------2</link>
            <guid isPermaLink="false">https://medium.com/p/448ec8114d5d</guid>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[sensors]]></category>
            <dc:creator><![CDATA[Rania Sasi Kirana]]></dc:creator>
            <pubDate>Wed, 22 Feb 2023 03:21:20 GMT</pubDate>
            <atom:updated>2023-02-22T03:30:54.947Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>a step-by-step guide</blockquote><p>Hello! My name is Rania Sasi Kirana and this is a story about a project I did in my class, II2260 Embedded System in Bandung Institute of Technology. If you’ve seen my first two article on ESP32 Project, welcome back! If you haven’t, kindly check out my other articles on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED Blink</a> and <a href="https://medium.com/@raniakiranaa15/esp32-project-input-output-122a5dd8be57">ESP32 Project: Input Output</a>.</p><h4>About this project</h4><p>Sensors are devices that read environmental condition, where natural quantities are sensed by sensors and converted into electrical quantities. This project’s objective is to try the built-in sensors on ESP32, which are the touch sensor and hall effect sensor.</p><h4>More on ESP32</h4><p>The electrical quantity that is read by the sensors is processed into information and tangible environmental meanings, which are referred to as<strong> </strong>perceptions. Based on the source of the stimulus, perceptions can be categorized as proprioception and exteroception. Proprioception senses the internal condition of the system, such as battery capacity and internal temperature. Exteroception perceives external conditions from environment, such as vision, audition, distance, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TpWoiQXhVcPmd_vEMHjk5Q.png" /><figcaption>Source: <a href="https://randomnerdtutorials.com/esp32-pinout-reference-gpios/">ESP32 Pinout Reference: Which GPIO pins should you use? | Random Nerd Tutorials</a></figcaption></figure><p>Internal sensor or proprioceptive sensor is commonly used to learn the condition of the ESP32 itself. There are 3 types of built-in sensor in ESP32: touch sensor, hall effect sensor, and temperature sensor. Not all ESP32 comes with a built-in temperature sensor so I’m only going to be doing two projects with touch sensor and hall effect sensor.</p><h4>Step 1: Software Required</h4><p>As always, we’re going to be using Arduino IDE and the ESP32 boards add-on as the programming environment so make sure you’ve installed all of it. If you don’t know where to start, you can check out my step-by-step guide on installing it in my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED Blink</a>.</p><h4>Step 2: Hardware Required</h4><ul><li>DOIT ESP32 DevKit v1</li><li>Breadboard</li><li>USB Cable</li><li>Magnet</li><li>5 mm LED</li><li>330 ohm Resistor</li><li>Jumper wires</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*4hWZ3Kt2xxxPF6rT" /><figcaption>male to female jumper wires</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*eeg7sgRrXVLc8Gpd.jpg" /><figcaption>male to male jumper wires</figcaption></figure><p>Keep in mind that the female to male jumper wires is used to connect the components on the breadboard to the ESP32’s pins, while male to male jumper wires is used to connect between components on the breadboard.</p><p>After you’ve prepared and set up the required software and hardware for this project, you can go ahead and start the projects.</p><h4>Project 1: Touch Sensor</h4><p>We’re going to start off with touch sensor. The ESP32 alone has 10 capacitive GPIOs (General Purpose Input Output) or pins on ESP32. These pins can sense variations in anything that holds an electrical charge, like the human skin. So, in this project, we’re going to prove that theory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z_VZVacwW5sp3B723ByvZQ.png" /><figcaption>Project 1: Touch Sensor</figcaption></figure><p>All you have to do for this first project is stick one male to female jumper wires in one of the touch pins on ESP32. You can choose any touch pins which you can see on the picture I’ve inserted above on the ‘More on ESP32’ section on. You just have to adjust the code according to the touch pins you’re using. You can open the code on the Arduino IDE, go to File &gt; Examples &gt; ESP32 &gt; Touch &gt; TouchRead.</p><pre>// ESP32 Touch Test<br>// Just test touch pin - Touch0 is T0 which is on GPIO 4.<br><br>void setup()<br>{<br>  Serial.begin(115200);<br>  delay(1000); // give me time to bring up serial monitor<br>  Serial.println(&quot;ESP32 Touch Test&quot;);<br>}<br><br>void loop()<br>{<br>  Serial.println(touchRead(T0));  // get value using T0<br>  delay(1000);<br>}</pre><p>If you don’t know how to run the code, I did a step-by-step guide on my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED Blink</a>. Then, open the serial monitor by clicking the search button on the top left corner. Make sure the serial monitor matches your code, if your code says “Serial.begin(115200)”, then choose the 115200 baud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*uhXjVDv7SfQIzE6DaZTHrg.gif" /><figcaption>Project 1: Touch Sensor</figcaption></figure><p>You can see that when I touch the end cable of the jumper wires, the number went down drastically, meaning that the pins detected electrical charge, in this case the human skin.</p><h4>Project 2: Hall Effect Sensor</h4><p>Hall effect sensor is located behind the metal lid of the ESP32 chip. It is used to detect magnetic variations in its surroundings. The greater the magnetic field, the greater the sensor’s output voltage. All you have to do to test this theory is put a magnet over the ESP32’s hall effect sensor. You can open the code on the Arduino IDE, go to File &gt; Examples &gt; ESP32 &gt; HallSensor.</p><pre>//Simple sketch to access the internal hall effect detector on the esp32.<br>//values can be quite low. <br>//Brian Degger / @sctv  <br><br>int val = 0;<br>void setup() {<br>  Serial.begin(9600);<br>    }<br><br>void loop() {<br>  // put your main code here, to run repeatedly:<br>  val = hallRead();<br>  // print the results to the serial monitor:<br>  Serial.println(val);//to graph <br>  delay(1000);<br>}</pre><p>Open the serial monitor by clicking the search button on the top left corner. Make sure the serial monitor matches your code, if your code says “Serial.begin(9600)”, then choose the 9600 baud. Add “delay(1000)” to your code to slow the time of the output in the serial monitor so you can see the numbers clearly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*-358IwBQccQ9AjG7qi2Hlg.gif" /><figcaption>Project 2: Hall Effect Sensor</figcaption></figure><p>You can see the numbers went down from positive values to negative values when I put a magnet over the ESP32. This is because ESP32 has a built-in sensor, hall effect sensor, that makes it able to detect magnetic variations in its surroundings.</p><h4>Bonus Project: Touch Sensor with LED</h4><p>For the bonus project, I built a simple touch-controlled LED circuit. This project is similar with the first project with touch sensor, only with LED. When you touch the GPIO, the LED will light up. Follow the schematic diagram I’ve inserted below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*68NnfVm4MGuhsReZ_nlbDQ.png" /><figcaption>Source: <a href="https://randomnerdtutorials.com/esp32-touch-pins-arduino-ide/">ESP32 Capacitive Touch Sensor Pins with Arduino IDE | Random Nerd Tutorials</a></figcaption></figure><p>You can just copy the code I’ve inserted below to your Arduino IDE and run the code.</p><pre>// Source: https://randomnerdtutorials.com/esp32-touch-pins-arduino-ide/<br>// set pin numbers<br>const int touchPin = 4; <br>const int ledPin = 16;<br><br>// change with your threshold value<br>const int threshold = 20;<br>// variable for storing the touch pin value <br>int touchValue;<br><br>void setup(){<br>  Serial.begin(115200);<br>  delay(1000); // give me time to bring up serial monitor<br>  // initialize the LED pin as an output:<br>  pinMode (ledPin, OUTPUT);<br>}<br><br>void loop(){<br>  // read the state of the pushbutton value:<br>  touchValue = touchRead(touchPin);<br>  Serial.print(touchValue);<br>  // check if the touchValue is below the threshold<br>  // if it is, set ledPin to HIGH<br>  if(touchValue &lt; threshold){<br>    // turn LED on<br>    digitalWrite(ledPin, HIGH);<br>    Serial.println(&quot; - LED on&quot;);<br>  }<br>  else{<br>    // turn LED off<br>    digitalWrite(ledPin, LOW);<br>    Serial.println(&quot; - LED off&quot;);<br>  }<br>  delay(500);<br>}</pre><p>You can change the threshold value based on the numbers that came out in your first project with the touch sensor. I used 20 as my threshold value to increase the sensitivity of the sensor because the numbers that came out when I touched the GPIO are between 1 to 10.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*l2D0jG0Qowrg3yn1zodODQ.gif" /><figcaption>Bonus Project: Touch Sensor with LED</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=448ec8114d5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ESP32 Project: Input Output]]></title>
            <link>https://medium.com/@raniakiranaa15/esp32-project-input-output-122a5dd8be57?source=rss-3dda1a44a171------2</link>
            <guid isPermaLink="false">https://medium.com/p/122a5dd8be57</guid>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[input-output]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <dc:creator><![CDATA[Rania Sasi Kirana]]></dc:creator>
            <pubDate>Sat, 11 Feb 2023 12:49:32 GMT</pubDate>
            <atom:updated>2023-02-22T13:11:45.851Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>a step-by-step guide</blockquote><p>Hello and welcome back! Let me reintroduce myself, my name is Rania Sasi Kirana and this is a story about a project I did in my class, II2260 Embedded System in Bandung Institute of Technology. If you’re new here, kindly check out my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED blink</a>.</p><h4>About this project</h4><p>Today I’ll be telling you about how a microcontroller interacts with the outside world, specifically how to read digital inputs and control digital outputs using the ESP32 board programmed with Arduino IDE. In this project, the push button switch will act as the digital input and LED as the digital output.</p><h4>More on ESP32</h4><p>ESP32 communicates with the outside world using input and output pin called General Purpose Input Output (GPIO) as interface, where this pin can be programmed as an input or an output. ESP32 has a variety of I/O interfaces, namely Analog-to-Digital Converter (ADC) and Digital-to-Analog Converter (DAC) interfaces, Serial-Parallel Interface (SPI), I2C, I2S, and UART interfaces, PWM output channel, and GPIO Capacitive Sensing. On ESP32, even though each pin can be switched, but still, there’s a default pin for every particular need, which pins are good for input, and which are for output.</p><h4>Step 1: Software Required</h4><p>Before we start, make sure you’ve installed Arduino IDE and the ESP32 boards add-on as we will program the ESP32 using Arduino IDE. If you haven’t installed it yet, don’t worry because I did a step-by-step guide on installing it in my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED Blink</a>.</p><h4>Step 2: Hardware Required</h4><ul><li>DOIT ESP32 DevKit v1</li><li>LED</li><li>Resistor 330 ohm</li><li>Resistor 10k ohm</li><li>Push button switch</li><li>Breadboard</li><li>Jumper wires</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UhsKEAfZiWy4zWXt" /><figcaption>female to male jumper wires</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*w3IKDI0fJRIG7CBv.jpg" /><figcaption>male to male jumper wires</figcaption></figure><p>The female to male jumper wires is used to connect the components on the breadboard to the ESP32’s pins, while male to male jumper wires is used to connect between components on the breadboard.</p><h4>Step 3: Onto the Next Step</h4><p>After preparing your hardware and setting up your software, we can go ahead and start the project. All you need to do now is replicate the scheme underneath.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l8BXakIbJyLeTRjYx2QAWg.png" /><figcaption>source: <a href="https://randomnerdtutorials.com/esp32-digital-inputs-outputs-arduino/">https://RandomNerdTutorials.com/esp32-digital-inputs-outputs-arduino/</a></figcaption></figure><p>After you’re done replicating the scheme, you can go ahead and plug in the ESP32 to your computer using a USB cable. Then, open Arduino IDE and select board and port accordingly. You can just copy and paste the code below to the main program of the Arduino IDE. Upload and verify to run the program.</p><pre>// Complete Instructions: https://RandomNerdTutorials.com/esp32-digital-inputs-outputs-arduino/<br><br>// set pin numbers<br>const int buttonPin = 4;  // the number of the pushbutton pin<br>const int ledPin =  5;    // the number of the LED pin<br><br>// variable for storing the pushbutton status <br>int buttonState = 0;<br><br>void setup() {<br>  Serial.begin(115200);  <br>  // initialize the pushbutton pin as an input<br>  pinMode(buttonPin, INPUT);<br>  // initialize the LED pin as an output<br>  pinMode(ledPin, OUTPUT);<br>}<br><br>void loop() {<br>  // read the state of the pushbutton value<br>  buttonState = digitalRead(buttonPin);<br>  Serial.println(buttonState);<br>  // check if the pushbutton is pressed.<br>  // if it is, the buttonState is HIGH<br>  if (buttonState == HIGH) {<br>    // turn LED on<br>    digitalWrite(ledPin, HIGH);<br>  } else {<br>    // turn LED off<br>    digitalWrite(ledPin, LOW);<br>  }<br>}</pre><p>On a side note, if you’re having trouble selecting the right board and port, uploading, or verifying, you can check out my first article on <a href="https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a">ESP32 Project: LED Blink</a> as I’ve explained the step-by-step process on selecting the right board and port to connect the ESP32 to your computer and running the program.</p><p>If the project were done successfully, when you press the push button switch, the LED should turn on and when you let go of the push button switch, the LED should turn off. But if it doesn’t work, then you’re not done yet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*X5BAy2m72Tibbb5hlBJPyQ.gif" /></figure><h4>Step 4: What if it didn’t work?</h4><p>I didn’t successfully do this project on my first attempt. So, I’m going to share problems that occur when I did this project and how to fix it.</p><p>When it didn’t work the first time, I switched the legs of the LED to see if I had put the positive pole (anode) and the negative pole (cathode) on the wrong sides. The LED turned on instantly after I did that. The problem now is that it shouldn’t have turned on because I didn’t press the push button switch yet. The code dictates that the LED only were supposed to turn on if the push button switch were pressed, or else it will be off.</p><p>Fortunately, my friend had encountered the same problem. You can try unplugging the USB cable from your computer, then plug it again. You don’t have to rerun the program, you can just push the button switch to see if the LED turn on. And mine worked after that, the LED turns on when I press the push button switch and turns off when I release it.</p><h4>The Finished Project</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0iCJ8sly9e80Hn0g87y7Zw.jpeg" /></figure><h4>Bonus Project: 2 LED</h4><p>For the bonus project, I built the same circuit, but I added one more LED. All you need is an extra LED, male to male jumper wire, and resistor. It’s basically the same as the previous project, only you have to connect the extra LED to the circuit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DKjcQ4VeTwVT9koxgmo0Ug.png" /><figcaption>Bonus Project: 2 LED</figcaption></figure><p>Then, you can use the exact code from the previous code to program the extra LED since you basically just connected the LED to the same circuit.</p><pre>// Complete Instructions: https://RandomNerdTutorials.com/esp32-digital-inputs-outputs-arduino/<br><br>// set pin numbers<br>const int buttonPin = 4;  // the number of the pushbutton pin<br>const int ledPin =  5;    // the number of the LED pin<br><br>// variable for storing the pushbutton status <br>int buttonState = 0;<br><br>void setup() {<br>  Serial.begin(115200);  <br>  // initialize the pushbutton pin as an input<br>  pinMode(buttonPin, INPUT);<br>  // initialize the LED pin as an output<br>  pinMode(ledPin, OUTPUT);<br>}<br><br>void loop() {<br>  // read the state of the pushbutton value<br>  buttonState = digitalRead(buttonPin);<br>  Serial.println(buttonState);<br>  // check if the pushbutton is pressed.<br>  // if it is, the buttonState is HIGH<br>  if (buttonState == HIGH) {<br>    // turn LED on<br>    digitalWrite(ledPin, HIGH);<br>  } else {<br>    // turn LED off<br>    digitalWrite(ledPin, LOW);<br>  }<br>}</pre><p>According to the code, when you press the pushbutton, both LED will turn on, and when you release it, both LED will turn off.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*k-JOHuG20ipp93hWuZ_upw.gif" /><figcaption>Bonus Project: 2 LED</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=122a5dd8be57" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ESP32 Project: Led Blink]]></title>
            <link>https://medium.com/@raniakiranaa15/esp32-project-led-blink-1c485a4f9b0a?source=rss-3dda1a44a171------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c485a4f9b0a</guid>
            <category><![CDATA[system]]></category>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[embedded]]></category>
            <dc:creator><![CDATA[Rania Sasi Kirana]]></dc:creator>
            <pubDate>Sat, 04 Feb 2023 15:19:31 GMT</pubDate>
            <atom:updated>2023-02-04T15:19:31.675Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>a step-by-step guide</blockquote><p>Hello! Today I’m going to talk about my very first hands-on project on building an embedded system. First off, my name is Rania Sasi Kirana and this is a story about a project I did in my class, II2260 Embedded System in Bandung Institute of Technology.</p><h4>What is an embedded system?</h4><p>I bet you’re curious when I first mentioned an embedded system. An embedded system is a combination of software and computer-based hardware, where we will be using a microprocessor or a microcontroller as the hardware.</p><h4>About this project</h4><p>In this particular project, we will be using ESP32 microcontroller and Arduino IDE (Integrated Development Environment) as the programming environment. The reason why we’ll be using Arduino IDE is because it is compatible with the ESP32. Don’t start to panic now as I will show you how to install Arduino IDE and other things that we will need to kick start this project.</p><h4>Step 1: Hardware Required</h4><p>First things first, you’re going to need an ESP32 Development Board, specifically ESP32 with the ESP-WROOM-32 chip (DEVKIT) V1. You can easily find this on electronic stores or better yet, you can look it up online. There are tons of ESP32&#39;s on any online shopping platforms. While you’re at it, you’re also going to need a USB cable and breadboard. You don’t necessarily need the breadboard for this first project, it’s just better to have it so you can insert the ESP32 to the breadboard for a better grip and you might need it for future projects. On a side note, you should have a few extra USB cables to spare because some might not work to connect the ESP32 with your computer.</p><h4>Step 2: Software Required</h4><p>As I have mentioned before, you’re going to need to install Arduino IDE in your computer so that you’re able to program the ESP32. Don’t worry cause I’m going to show you how to install it.</p><p>First, install the Arduino IDE on <a href="https://www.arduino.cc/en/Main/Software">https://www.arduino.cc/en/Main/Software</a>. You can go ahead and click the download options accordingly. From that point on, you just follow all the steps to install the Arduino IDE on your computer. And then you’re going to run and configure the Arduino so that you can use it to program your ESP32 board by installing the ESP32 board package.</p><ol><li>Open the File window -&gt; Preferences.</li></ol><p>2. Insert the following link on Additional Board Manager and then hit “OK”.</p><p>URLs: <a href="https://dl.espressif.com/dl/package_esp32_index.json">https://dl.espressif.com/dl/package_esp32_index.json</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*B9F5QzKDKekyzIOCd00SDQ.png" /></figure><p>3. Next, open Tools window -&gt; Boards Manager. Type in “ESP32” on the Boards Manager search, then click “INSTALL”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*xWK9toLKvCx62Gzbv8tkLw.png" /></figure><p>4. After installing the ESP32 package, open Tools window -&gt; ESP32, then choose “DOIT ESP32 DEVKIT V1” to adjust to the type of board we’re using.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*itpKhSd8Q7xs1d3POyzuSg.png" /></figure><p>Lastly, you’ll need to install the driver USB to UART in order to enable communication to happen between your computer and the ESP32 board.</p><p>URLs: <a href="https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads">https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*olrnC7nfKj6fJzEaEtp5qw.png" /></figure><p>Now, if you’re a Windows user like me, you’re going to want to install the latest version “CP210x Universal Windows Driver”. After finishing the installation, you’d have to extract the entire folder to your computer since it will be installed in ZIP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*djO1VLQDBLS0-JruCev5QQ.png" /></figure><p>Open the extracted folder -&gt; click right on the silabser.inf file -&gt; Show more options -&gt; Install.</p><h4>Step 3: You’re all set</h4><p>We’re going to try the simple thing first, making the ESP32 board’s LED blink. There is a built-in example in the Arduino IDE to make the LED blink. You just have to open the File window -&gt; Examples -&gt; 01.Basics -&gt; Blink.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LoXYDEHsV4JGjUkEMbJDtA.png" /></figure><p>You’ll need to select the port. Click Select Board -&gt; Select other board and port. Search “DOIT ESP32 DEVKIT V1” for the board selection -&gt; select the port -&gt; click “OK”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*oddiBIXauhVsHzzWklx0Zw.png" /></figure><p>Click the button that looks like a checklist underneath the File window to verify, then the arrow button next to it to upload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*UryzxN2TAgrCug5Vyuf8aQ.png" /></figure><p>Now, this part is really important. I had a bit of trouble in this point of the project. Some computers will automatically select the port for you, but if your computer is like mine, you’ll need to select the port manually. I chose the COM3 Serial Port since I didn’t know which port to use at first and my friends told me to use the COM3. Unfortunately, that didn’t work, and an error message appeared.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*cgZaO2EG1g0Vxeo8hZqvOA.png" /></figure><p>I started to ask for my friend’s help but none of them knew the solution to my problem. Some didn’t have a problem with that, others have the exact same problem but didn’t know how to solve it. Then I noticed one of the ports had the word “(USB)” next to it, so I decided to verify and upload again and it worked. The serial port number is not all going to be the same between different computers, that’s why COM3 worked on my friend’s computer but not mine. The word “(USB)” shows which port you’re currently plugging the USB cable to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*op3ZkfsIm4-E1yss54JQGQ.png" /></figure><p>Then, a different error message appeared. Luckily, one of my friends came across the same problem and was able to help me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*zOL7HEzWzfOIEf34cw-j5g.png" /></figure><p>As it turns out, when the dot “…..____….__” following the word “Connecting” appeared, you have to hold the “BOOT” button on the ESP32 board as I have highlighted yellow in the picture below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*vQtkWgcxVxoj7PLuqj0qRw.jpeg" /></figure><p>So, all you gotta do now is just verify and upload again, then hold the “BOOT” button, and voila! The ESP32 board’s LED will start blinking.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*yxCrmBBioU_Q63MUPNV3DA.gif" /></figure><p>That’s all from me for this very first project. I hope you enjoy this article and you can learn something from it. I will be updating on future projects in this blog. Stay tune!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c485a4f9b0a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mahasiswa: Apa itu artinya?]]></title>
            <link>https://medium.com/@raniakiranaa15/mahasiswa-apa-itu-artinya-a80dfe8201ad?source=rss-3dda1a44a171------2</link>
            <guid isPermaLink="false">https://medium.com/p/a80dfe8201ad</guid>
            <dc:creator><![CDATA[Rania Sasi Kirana]]></dc:creator>
            <pubDate>Mon, 11 Jul 2022 08:50:08 GMT</pubDate>
            <atom:updated>2022-07-11T08:51:36.359Z</atom:updated>
            <content:encoded><![CDATA[<p>Apa sih artinya menjadi seorang mahasiswa? Apakah sama saja dengan seorang siswa? Apakah arti tambahan ‘maha’ di depan kata siswa dan apa maknanya bagi seorang mahasiswa?</p><p>Menurut KBBI,</p><blockquote><strong><em>mahasiswa</em></strong> <strong>/</strong>ma.ha.sis.wa/ n<em> </em>orang yang belajar di perguruan tinggi</blockquote><p>Lantas, apakah arti seorang mahasiswa sebatas itu saja? orang yang belajar di perguruan tinggi? Tentu saja tidak. Pada dasarnya, mahasiswa sebagai pelaku pendidikan tinggi dianggap memiliki tanggung jawab yang lebih besar dari siswa sebagai konsekuensi dari posisi dan potensi yang dimilikinya. Apa itu maksudnya? Mari kita bahas lebih lanjut.</p><p>Sebagai pelaksana pendidikan tinggi, perguruan tinggi melaksanakan yang dinamakan Tridharma perguruan tinggi. Tridharma perguruan tinggi adalah kewajiban perguruan tinggi untuk melaksanakan pendidikan dan pengajaran, penelitian dan pengembangan, dan pengabdian masyarakat.</p><p>Pendidikan dan pengajaran merupakan hal yang sangat penting dalam institusi pendidikan manapun. Jika proses belajar dan mengajar oleh civitas akademika tidak berjalan dengan baik, seperti ketika ilmu tidak berhasil diajarkan oleh dosen kepada mahasiswa, maka akan berdampak pada potensi seorang mahasiswa yang berupa ilmu pengetahuan yang dimilikinya.</p><p>Poin kedua, penelitian dan pengembangan, adalah salah satu bentuk kontribusi mahasiswa agar negara terus maju dan berkembang. Tanpa adanya penelitian dan pengembangan, maka ilmu pengetahuan tidak akan maju dan bangsa akan terus berada di tempat yang sama.</p><blockquote>Sejatinya, mahasiswa adalah bagian dari masyarakat juga.</blockquote><p>Poin terakhir merupakan pengabdian masyarakat. Percuma jika ilmu yang mahasiswa miliki tidak memberikan dampak perubahan apapun pada masyarakat. Karena itulah mahasiswa kerap disebut sebagai agen perubahan akibat potensi yang dimilikinya untuk turut mengubah masyarakat.</p><p>Tridharma perguruan tinggi itu adalah sebuah<em> cycle </em>yang harus terus berjalan. Dari ilmu yang didapat dalam perguruan tinggi kemudian diaplikasikan dalam bentuk pengabdian masyarakat dan juga dikembangkan kembali melalui penelitian dan pengembangan. Melalui tiga kewajiban tersebut, generasi intelektual yang dapat berpikir kritis dan solutif yang mampu memajukan bangsa akan dapat terbentuk.</p><p>Lalu, apa yang dimaksud dengan kemahasiswaan? Pentingkah untuk seorang mahasiswa memiliki semangat dalam berkemahasiswaan? Dan adakah hubungannya dengan tridharma perguruan tinggi?</p><p>Menurut KBBI,</p><blockquote><strong><em>kemahasiswaan</em></strong> / ke.ma.ha.sis.wa.an / n seluk-beluk mahasiswa; yang bersangkutan dengan mahasiswa</blockquote><p>Berkemahasiswaan artinya proses seorang mahasiswa aktif melakukan kegiatan-kegiatan yang mendukung potensi, posisi, dan peran sebagai mahasiswa sebagai upaya berkontribusi kepada masyarakat. Kembali lagi pada tridharma perguruan tinggi, potensi seorang mahasiswa adalah ilmu pengetahuan yang dimilikinya, posisi mahasiswa sebagai bagian dari masyarakat yang kemudian menumbuhkan potensi untuk turut mengubah masyarakat, dan juga peran mahasiswa sebagai konsekuensi atas posisi dan potensi yang dimilikinya.</p><p>Berkemahasiswaan juga dapat menjadi sebuah wadah pengembangan diri dan pencarian jati diri oleh mahasiswa. Dimana dengan berkemahasiswaan, mahasiswa dapat menambah ilmu dan pengalaman serta mengasah kemampuan diri untuk kemudian digunakan dalam berkontribusi secara aktif untuk masyarakat. Tidak hanya itu, dengan berkemahasiswaan, mahasiswa pun dapat membangun relasi dan mendapatkan suatu <em>sense of community </em>atau rasa kebersamaan dari suatu komunitas, konteksnya dalam hal ini adalah perkumpulan mahasiswa.</p><p>Maka dari itu, sangatlah penting untuk seorang mahasiswa memiliki semangat dalam berkemahasiswaan. Tidak hanya untuk memenuhi posisi, potensi, dan peran yang dimiliki, tetapi juga esensial dalam <em>self development </em>atau pengembangan diri seorang mahasiswa menjadi pribadi yang mampu berpikir kritis dan solutif dalam penyelesaian suatu masalah dalam masyarakat dan pada akhirnya ikut berperan dalam memajukan bangsa dan negara.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a80dfe8201ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Semangat Berkemahasiswaan]]></title>
            <link>https://medium.com/@raniakiranaa15/semangat-berkemahasiswaan-700540c3e27e?source=rss-3dda1a44a171------2</link>
            <guid isPermaLink="false">https://medium.com/p/700540c3e27e</guid>
            <dc:creator><![CDATA[Rania Sasi Kirana]]></dc:creator>
            <pubDate>Fri, 08 Jul 2022 16:03:46 GMT</pubDate>
            <atom:updated>2022-07-08T16:05:47.744Z</atom:updated>
            <content:encoded><![CDATA[<p>Semangat berkemahasiswaan adalah suatu hal yang penting dimiliki seorang mahasiswa. Menurut Tri Dharma Perguruan Tinggi, pendidikan dan pengajaran, penelitian dan pengembangan, dan pengabdian masyarakat, ilmu yang didapat pada perguruan tinggi ujungnya pasti akan digunakan untuk pengabdian masyarakat.</p><p>Gema Wachid Aryasatya yang biasa dipanggil Gema, mahasiswa jurusan Teknik Tenaga Listrik’20 menjabat sebagai Sekretaris Jenderal SRE (Society of Renewable Energy) ITB.</p><p><em>“Tantangan terbesar selama menjabat?”</em></p><p>Tentu saja memegang suatu jabatan tidak datang tanpa tantangannya sendiri. Menjadi sekretaris jenderal juga merupakan sebuah pengalaman baru bagi mas Gema. Mas Gema pun masih belajar dan berusaha mengembangkan diri menjadi lebih baik lagi kedepannya.</p><p>Menurut mas Gema, tantangan terbesar selama memegang jabatan di SRE ITB adalah manajemen waktu, terutama mengingat padatnya perkuliahan di jurusan. Sehingga mas Gema harus belajar membagi waktu antara memenuhi tanggung jawabnya sebagai sekjen SRE tanpa meninggalkan kewajibannya sebagai mahasiswa.</p><p><em>“Gimana cara memanajemen waktu dengan baik?”</em></p><p>Mas Gema memberikan saran untuk memanajemen waktu dengan baik salah satunya adalah dengan membuat target mingguan. Dengan menggunakan aplikasi seperti notion, mas Gema menuliskan apa saja yang hendak dikerjakan dalam seminggu itu. Mas Gema juga menekankan jika telah terbiasa memiliki kebiasaan yang produktif, maka belajar untuk perkuliahan akan semakin efektif. Ketika belajar akan lebih fokus karena sudah tertanam <em>mindset</em> untuk menyelesaikan segala tugas tanpa menunda-nunda melihat tidak adanya waktu luang yang ada untuk belajar terpotong untuk berorganisasi.</p><p>Singkatnya, jika kita menghabiskan waktu untuk melakukan suatu yang produktif seperti berorganisasi, maka kehidupan perkuliahan juga akan terbantu karena adanya perubahan kebiasaan untuk tidak menunda-nunda pekerjaan.</p><p><em>“Tips and trick berkemahasiswaan”</em></p><p>Salah satu tips yang mas Gema berikan yaitu ketika waktu kuliah harus selalu memerhatikan dosen yang mengajar. Sebelum kelas juga membaca-baca terlebih dahulu apa yang akan dipelajari agar ketika dosen menjelaskan sudah mendapat gambaran materinya dan akan lebih paham. Mengingat waktu yang tidak banyak untuk mengulangi dari nol setelah kelas sehingga harus memanfaatkan waktu dosen mengajar dengan baik.</p><p>Dari <em>interview</em> yang saya dan teman-teman saya lakukan dengan mas Gema, saya mendapatkan kesimpulan bahwa berkemahasiswaan tentunya datang dengan tantangan tersendiri. Semangat berkemahasiswaan adalah suatu hal yang esensial untuk dimiliki mahasiswa. Tetapi, mahasiswa tidak boleh melupakan kewajibannya sebagai insan akademis. Salah satu potensi yang dimiliki mahasiswa sebagai masyarakat akademis adalah ilmu pengetahuan yang dimilikinya. Dibutuhkan juga suatu perubahan kebiasaan seperti cara belajar dan manajemen waktu yang baik untuk mengatasi tantangan yang dihadapi.</p><p><em>Nama : Rania Sasi Kirana</em></p><p><em>NIM TPB : 16521042</em></p><p><em>Bata/Kelompok : 9/89</em></p><p><em>Jurusan : Sistem dan Teknologi Informasi</em></p><p><em>Dibuat sebagai pemenuhan tugas Daily Quest 3 KAT ITB 2022</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=700540c3e27e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>