teleren/devto huggingface dataset:
How I flash my ESP01 device
Tags: iot, flashing, esp, nicetoknow
Published: 2024-02-02 18:37:08

---
title: How I flash my ESP01 device
published: true
date: 2024-01-25 08:47:42 UTC
tags: IOT,Flashing,ESP,NiceToKnow
canonical_url: https://blog.bajonczak.com/how-to-flash-an-esp01-device/
---

I want to use Tasmota in my house more and more, but I don't want to use it on the wemos d1 mini devices, because it must only measure temperatures or s.th. other. So I decided to use a smaller device, like the ESP01. This device has ONLY one GPIO port. This is mostly enough for a simple sensor. This device looks like this

![](https://www.kollino.de/wp-content/uploads/2018/10/ESP8266_BIG-570x300.png)

But how I can get a Tasmota firmware onto this device? This article will describe it for you.

# The Bucketlist

On the bucketlist I hav the an Programmer likt this ESP-01 Flasher [https://amzn.to/3PV8M17](https://amzn.to/3PV8M17?ref=blog.bajonczak.com). This looks like this.

![](https://www.xgadget.de/wp-content/uploads/2016/10/ESP-01_USB-Programmer-300x150.jpg)

This tool is very cheap and handy to use, just place the esp01 on top of this and you can flash it. But there is one more step to do

<!--members-only-->

# Flashmode

Before you can flash the module, you must tell the module to get in the flashing mode, for this you must create a bridge between GPIO0 and GND.

![](https://blog.bajonczak.com/content/images/2023/10/image-8.png)

This will set your device in the flashing mode.

# Flashtools

How we can flash the firmware onto the device? I use a Linux console and install the ESP Flash tool

```
sudo apt install esptool
```

This command will install the [ESPTool](https://github.com/espressif/esptool?ref=blog.bajonczak.com) from espressif. This tool will be used to upload the firmware onto the ESP01 device. Next we need firmware. Let's use it as Tasmota Firmware, let's download this with

```
wget http://ota.tasmota.com/tasmota/release/tasmota-4M.bin.gz
uinzip tasmota-4M.bin.gz
```

Now we have all the required tools to get firmware onto the device.

# Flash!

Don't panic, this is not a complex process, for this, you must execute the following command

```
esptool --port /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0 0x0 tasmota-4M.bin
```

You must adjust the parameters behind the --port, this will define the port where the programmer is logged in. Then you must modify the path to the bin file.

The log output looks then like this:

```
esptool.py v2.1
Connecting...
Detecting chip type... ESP8266
Chip is ESP8266
Enabling default SPI flash mode...
Configuring flash size...
Erasing flash...
Flash params set to 0x0320
Took 0.06s to erase flash block
Wrote 726016 bytes at 0x00000000 in 74.1 seconds (78.4 kbit/s)...

Leaving...
Hard resetting...

```

After that, the firmware is completely uploaded!

# Final words

Yes, this was a small blog post about basic knowledge, but I think this would be helpful for other guys. Now you will be able to flash the ESP-01 device with your custom firmware. So now it's your turn! What are your plans with your ESP-01 and which firmware do you want to use?
Vietnam Human Hair Extensions Supplier
Published: 2024-01-25 15:36:35

https://8-hair.com/ With more than 10 years of expertise in hair research and manufacturing✔️ 8Hair is pleased to be one of the most prominent hair manufacturers in Vietnam with a large number of customers around the world✔️✔️✔️
+84 898 600 954
wholesale@8-hair.com
42 Le Loi Street, Hai Chau District, Da Nang City, Vietnam
#8hair #8hairvietnam #8hairfactory #humanhairsuppliervietnam
https://hashnode.com/@8haircom
https://8haircom.zohosites.com/
https://hackmd.io/@8haircom
Your thought on Hackathon
Tags: web3, rust, hackathon
Published: 2024-01-25 15:28:35

Hey devs,
Happy to join here. Just curious about how the hackathon strategy is taking place in the Dev community here. I consider hackathon as a pillar to take on a challenge that could brush up and improve my coding skills. So I wonder if there's a way I can form a team to take on one hackathon challenge in Web3 called HackSecret 2024 which seems to have immense potential in helping me build my career in smart contract development in Rust as well as frontend and backend.

Anyway?
The Machine Learning Journey: A Comprehensive Guide for Beginners
Published: 2024-01-25 15:28:07

Introduction:
This blog post will take you on a journey through the world of machine learning, providing a comprehensive guide for beginners to understand the concepts, techniques, and applications of this transformative field.

1. **What is Machine Learning?**
   - Definition: Machine learning is a subfield of computer science that gives computers the ability to learn without being explicitly programmed.
   - Key Concepts:
     - Data: The foundation of machine learning is data.
     - Algorithms: Machine learning algorithms analyze data and extract patterns or insights.
     - Models: Algorithms are used to train models, which represent the learned knowledge.
   
2. **Types of Machine Learning:**
   - Supervised Learning: Algorithms learn from labeled data, where the output is known.
   - Unsupervised Learning: Algorithms learn from unlabeled data, finding patterns or structures.
   - Reinforcement Learning: Algorithms learn by interacting with their environment and receiving rewards or penalties.

3. **Machine Learning Algorithms:**
   - Linear Regression: A simple algorithm used for predicting continuous values.
   - Logistic Regression: Used for binary classification problems.
   - Decision Trees: A tree-like structure that makes decisions based on data features.
   - Random Forest: An ensemble of decision trees for improved accuracy.
   - Support Vector Machines: Used for both classification and regression problems.

4. **Model Evaluation:**
   - Accuracy: The measure of how well a model's predictions match the actual labels.
   - Precision and Recall: Used to evaluate classification models' performance.
   - F1 Score: A balanced measure of precision and recall.

5. **Machine Learning Applications:**
   - Healthcare: Diagnosis and treatment recommendations.
   - Finance: Fraud detection and stock market predictions.
   - Manufacturing: Quality control and predictive maintenance.
   - Retail: Product recommendations and customer segmentation.

6. **Getting Started with Machine Learning:**
   - Choose a Programming Language: Python is a popular choice for machine learning.
   - Learn Fundamental Concepts: Data preprocessing, feature engineering, and model selection.
   - Practice with Datasets: Kaggle provides various datasets for machine learning projects.

Conclusion:
Machine learning has revolutionized various industries, and its potential continues to grow. This comprehensive guide provides a solid foundation for beginners to embark on their machine learning journey, enabling them to understand the concepts, techniques, and applications of this powerful technology.
Изменить стиль оформления сообщения, выводимого console.log
Tags: css, console, javascript
Published: 2024-01-25 15:22:18

Выводимому в консоль значению можно задать стиль оформления добавив в начало текста сообщения (первого аргумента) символы `%c`, а вторым аргументов добавив строку с описанием css-стилей. 
Например:

`console.log('%cочень необычный лог', 'color: #00FF00; background: #4B0082; font-family: "Times New Roman"; font-size: 18px; padding: 10px;');`

Результат:

![Результат вывода console.log со стилевым оформлением](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hf3hae5q687i3tziiwmd.png)
no more dotenv in node v20
Tags: discuss
Published: 2024-01-25 15:19:20

Is there someone who knows how to use .env? without dotenv package with typescript? 
I try yo use  node --env-file .Env or the script "dev": "ts-node node --env-file=. env src/server/index. ts" in the package. json and doesn't work

Your help would be greatly appreciated 🫶
User Story Template: crafting effective stories
Tags: webdev, product, tutorial, beginners
Published: 2024-01-25 15:04:03

All great products involve users.

A well-structured user story is the cornerstone of effective product development, helping your team understand and prioritize the needs of your users. This User Story Template provides a structured framework to create user stories that encapsulate user goals, tasks, and acceptance criteria, ensuring your team remains aligned and focused on delivering meaningful value.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e9i0hgs0r861zj2npozj.png)

##Components of a User Story:##

1. User Role: This defines the primary persona or role for whom the feature is being built.
2. Action (Verb): Describes a specific action the user wants to perform or a goal they want to achieve.
3. Benefit: Explains why the user wants to perform the action and the value they expect to gain.

[Read all and get a template 
](https://enkla.substack.com/p/user-story-template-crafting-effective)

##Template of a User Story:##

As a [User Role],

I want to [Perform a specific action or achieve a goal],

So that [State the benefit or outcome for the user].

Tasks:
Outline the sequential or parallel tasks the user must complete to achieve their goal.

Add additional tasks if necessary.

Acceptance criteria:

Enumerate the conditions that must be met for the story to be considered complete and satisfactory.

State specific functionalities, features, or interactions that need to be implemented.

List any edge cases or exceptions that should be addressed.

Specify performance, security, or usability requirements.

##Example##
User Role: As a website visitor,

I want to: view a list of available workshops and their details,

So that: I can decide which workshop aligns with my interests.

As a website visitor, I want to: view a list of available workshops and their details, so that I can decide which workshop aligns with my interests.

Tasks:

1. Navigate to the "Workshops" section on the homepage.
2. Browse through the list of workshops and their brief descriptions.
3. Click on a workshop to view its detailed schedule and instructors.

Acceptance Criteria:

The "Workshops" section is accessible from the homepage navigation menu.

Each workshop listing includes its title, date, location, and a brief description.

Clicking on a workshop displays a page with its full schedule, instructor profiles, and registration details.

[Read all and get a template 
](https://enkla.substack.com/p/user-story-template-crafting-effective)
Facebook Clone SwiftUI
Tags: swift, softwaredevelopment, codenewbie, tutorial
Published: 2024-01-25 14:56:15

Last month I launched a YouTube channel where I'm teaching how to create iOS apps using both swiftui and uikit.
I will be teaching how to build iOS apps from scratch, I will be also teaching design patterns, answering some iOS interview questions and talking about everything related to iOS development.
If you want to take some time to explore my YouTube Channel, you may find something that will be helpful in your learning journey.
Here is the link:
https://www.youtube.com/@OmarTHAMRI
My latest uploaded tutorial series is to build a Facebook clone using swiftui and firebase.
part 1: https://www.youtube.com/watch?v=Xjnm8QMOniA
part 2: https://www.youtube.com/watch?v=ha_tlWvLfEo&t=182s
part 3: https://www.youtube.com/watch?v=cXOiiHdynXY
part 4: https://www.youtube.com/watch?v=Bq4bGZ5Bh-g
part 5: https://www.youtube.com/watch?v=epvpYU0Gt1I
part 6: https://www.youtube.com/watch?v=N9f8QvQ9V8k&t=43s
part 7: https://www.youtube.com/watch?v=BBVavFO73Us&t=202s
part 8: https://www.youtube.com/watch?v=6oB8_ixJbr0&t=249s
part 9: https://www.youtube.com/watch?v=TtuZgcp3hwA
part 10: https://www.youtube.com/watch?v=mZ8XLA6Z6qs&t=87s
part 11: https://www.youtube.com/watch?v=u8U6E3Sdng8&t=392s
part 12: https://www.youtube.com/watch?v=Ai7dxHQIIw4&t=121s
part 13: https://www.youtube.com/watch?v=1JucSvSRID8&t=94s
Faster Color picking in Tailwind
Tags: tailwindcss, color, tip
Published: 2024-01-25 14:51:40

Even tho tailwind provide a lot of customizability still this method of choosing colors can be little restrictive and inefficient 
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2vb9mf3hjh5m0eiuru0d.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ure34w3rkzapgtp53xc.png)

if you want more freedom in choosing the colors :

1. First install the extension Color info on your VCS code editor.
2. second after creating a tailwind class, let s say for example you wanna customize the color of a text:(className="text-...")
first put a random color using #ffff(or any hex number) so color info can read it 
second now you can see the GUI to change the color to what you want 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bsvedoi0w0sb8rdeu4g4.png)

lastly after you choose your hex number color you have to just enclosed it in brackets [#ffff] and tailwind would be able to read it.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yhcumzshduw8s2r4r5ra.png)

_I hope this helps._
Expand Your Reach with Accurate French Subtitles
Published: 2024-01-25 14:43:43

Say goodbye to the tedious and time-consuming process of manually translating your videos into French.  French Subtitle Generator automates the entire process, saving you countless hours of work and delivering precise subtitles that enhance the viewer experience. With  French Subtitle Generator, you can tap into the enormous potential of the French-speaking market. By automatically adding French subtitles to your videos, you can expand your reach, increase engagement, and ultimately boost your brand's visibility and growth.
pip-audit: Managing pip Vulnerabilities
Tags: python, security, programming, beginners
Published: 2024-01-25 14:40:45

When the standard library doesn't cut it, developers turn to third-party packages to extend functionality. While the Python community uses fewer than the JavaScript community, most large Python projects use several third-party packages. Managing these packages can be a pain, and staying up to date with the latest security patches is even more challenging. Luckily, the open-source community has come to the rescue yet again with a tool to do this for us.

## Supply Chain Security
Before I cover pip-audit, I need to discuss supply chain security. Typically, the phrase "supply chain" is associated with global manufacturing companies that use materials from all over the world. Due to this, it is all too easy for a malicious actor to compromise one of the many components in the supply chain. This concept can be applied to software development as we typically use several packages created by various different developers. The packages we rely on can be poorly written, vulnerable to an unknown zero-day, or intentionally compromised (not unheard of with npm packages). While we can't remediate all vulnerabilities, we can apply best practices to mitigate the risk of compromise.

## Using pip-audit
Like all pip packages, you should install pip-audit into a virtual environment. In pipenv, you do this by running `pipenv shell` to activate the virtual environment and then `pipenv install --dev pip-audit`. We use the `--dev` flag to specify that pip-audit is a development dependency and not part of the application. A notable limitation as of the time of writing is that pip-audit cannot audit Pipfiles or Pipfile.lock files. However, it can audit installed packages, and pipenv supports converting Pipfiles and Pipfile.lock files into requirements.txt files. 

Then, we develop as usual, installing all the packages. Ideally, you would know what packages you need, install them, and run `pipenv run pip-audit` to audit the packages before development begins. Auditing is a best practice because it reduces the chances of developing your application with a vulnerable package Before packaging up/deploying your app, you should audit the packages again to ensure they aren't vulnerable. Again, this does not guarantee that the packages are secure, but it does reduce the chances of one slipping through the cracks.

## Takeaway
Security is everyone's job, and Python developers are no exception. pip-audit is a tool that all Python developers should use to audit installed packages and be aware of their application's security posture. Using this tool, we do our due diligence and make the world more secure, one application at a time.
Ibuprofeno.py💊| #36: Explica este código Python
Tags: python, beginners, spanish, learning
Published: 2024-01-25 14:37:18

## **<center>Explica este código Python</center>**
#### <center>**Dificultad:** <mark>Básico</mark></center>

```py
## Reto #36
lista = [1,2,3]
lista[10] = 0
print(lista) # 🤔
```

- A. `[1, 2, 3, 0]`
- B. `[1, 2, 3, "", "", "", "", "", "", "", 0]`
- C. `[1, 2, 3]`
- D. `IndexError`

---

Respuesta en el primer comentario.
Ibuprofeno.py💊| #35: Explica este código Python
Tags: python, spanish, learning, beginners
Published: 2024-01-25 14:36:27

## **<center>Explica este código Python</center>**
#### <center>**Dificultad:** <mark>Básico</mark></center>

```py
## Reto #35
s = "Murcielago"
print(s[-3:])
```

- A. `Mur`
- B. `lago`
- C. `ago`
- D. `SyntaxError`

---

Respuesta en el primer comentario.
Blinking an LED with Arduino
Tags: arduino, iot, programming, beginners
Published: 2024-01-25 14:33:23

Blinking an LED is a fundamental project for Arduino enthusiasts. In this tutorial, we'll go through the process of blinking an LED using the Arduino uno R4 WIFI (steps same for most Arduino boards) and a breadboard. Let's get started!

### Materials Needed:

1.  Arduino Board (Ex: uno)
2.  Breadboard and jumper wires
3.  LED
4.  Resistor (270Ω)
5.  USB cable for Arduino
6.  Arduino IDE installed on your computer

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5yrj5uron75jeif4h4vk.jpg)

### Step 1: Set Up the Hardware:
1. Connect the short leg (cathode) of the LED to GND on the Arduino.

2. Connect the long leg (anode) of the LED to  resistor ( 270Ω) and to pin 13 on the Arduino.


You can connect the components differently on breadboard as long as you follow the same circuit its fine.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tllnw3t4xoexog1xxt8c.png)

### Step 2: Connect your Arduino board to your computer
Cables can be different depending on Arduino board. Some can use USB and others Type-C cables. Can connect depending on your board.


### Step 3: Writing the codes
In your Arduino IDE add those codes.

``` cpp
// Blinking a single LED
int ledPin = 13; // Pin number for the LED

void setup() {
  pinMode(ledPin, OUTPUT); // Sets the LED pin as an output
}

void loop() {
  digitalWrite(ledPin, HIGH); // Turn the LED on
  delay(1000); // Wait for 1 second
  digitalWrite(ledPin, LOW); // Turn the LED off
  delay(1000); // Wait for 1 second
}
```

### Step 4: Uploading the codes
Now, make sure that in your Arduino IDE the correct board is selected and click on the upload button.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u6j5brjeit6yyqcek7vk.png)

Your codes should be uploaded successfully.

If the steps above were followed, the led will be blinking every one second 🎉

You can read more on the article 👉🏾[here](https://amanieric.com/blog/blinking-an-led-with-arduino)

If you liked this post, you might as well like to checkout on fading an LED.
[Fading an LED](https://dev.to/ericus123/fading-an-led-with-arduino-24ac)
Настройка корректной работы eslint в VS Code, когда .eslintrc.js располагается не в корневой директории.
Tags: eslint, vscode, linter, changeprocesscwd
Published: 2024-01-25 14:32:38

В settings.json добавить правило 

```
"eslint.workingDirectories": [{ 
    "directory": "/path/to/directory/with/eslintrc_file", 
    "changeProcessCWD": true 
},],
```
Выдержка из доки по поводу данной настройки:

> ```javascript
>     "eslint.workingDirectories": [
>       "./client", // changeProcessCWD defaults to false
>       { "directory": "./server", "changeProcessCWD": true }
>     ]
>   ```
>   In the above example, `client.js` will be evaluated from `root` using `root/client/.eslintrc.json`,
>   while `server.js` will be evaluated from `root/server` using `root/server/.eslintrc.json`
>   Using `changeProcessCWD` causes vscode-eslint to change the current working directory of the eslint process to `directory` as well. This is often necessary if ESLint is used to validate relative import statements like `import A from 'components/A';` which would otherwise be resolved to the workspace folder root.
Chat with Google Gemini on the Web
Tags: chatgpt, react, webdev, ai
Published: 2024-01-25 14:32:32

👋 Hello, I want to share a new project I started this week.

👨🏻‍💻 I wanted to make my ChatGPT version for Google Gemini, and I just finished the initial version, feel free to test it!

![Google Gemini Chat Screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1pg2fqgx9sy4hzefhfhw.png)

Live Preview: https://google-gemini-ui.vercel.app

Code: https://github.com/fjosue4/google-gemini-ui

Any feedback or bug found is welcome.

Please feel free to clone, send a PR, or open an issue if you'd like to add more features.

Thanks!
Just one more time
Published: 2024-01-25 14:27:55

"Just one more state, bro! I promise this is the last one."

Perhaps you've already heard a technobro (technology enthusiast) saying something like that. Well, that technobro is me, just mentioning one more challenge. I promise this is the last one.

I'm back to the Woovi challenge again, and this time I'll try to make something simpler. I'll attempt to create a droplist wiki for a game fueled by players with a few moderators on Discord.

The idea is pretty straightforward—a CRUD with GraphQL, Relay, and React. I'll use Next.js version 13 because I'm more familiar with it, and every new version of Next.js adds overhead to understand with tons of new documentation. So, I hope this time things work better.

I have talked with people who want to use the wiki, and the design should be something very simple. The interface should be as simple as possible—perhaps this is the most minimalist project that I have done.
Unlocking Efficiency: Embracing the Power of Binary Search
Published: 2024-01-25 14:26:57

Delving into the efficiency of binary search today! ⚙️ With a time complexity of O(log n), it's a brilliant algorithm for devs working with large, sorted datasets. Embrace the power of divide and conquer! 💻🌐 
#DevCommunity #Algorithms #BinarySearch``