taller-de-refactorizacion-y-limpieza-de-codigo-en-arduino

Refactoring and Code Cleanup Workshop in Arduino

  • 1 min

This week we are going to do a refactoring workshop to learn how to make our Arduino code cleaner and more organized.

For this workshop, we have proposed an exercise. We will start from a source code and the goal is to modify it to be better organized, while maintaining its functionality.

The source code is taken from the open-source project Alexa-Controlled Thermostat with NodeMCU v3 and Raspberry Pi - Hackster.io. So, take a moment to thank the author for sharing their work and project.

This project consists of a single code file, which reads a temperature sensor, a rotary encoder, displays data on an LCD, and uses the Alexa API.

Important: the exercise consists solely of refactoring the code. You do not need to add functionalities or modify the way the original code performs its tasks. You only need to reorganize and clean it up, maintaining the functionality.

You have this week to look at the code and refactor it. We remind you of the tips from this post for writing clean and organized code.

taller-refactorizacion-dicord

You don’t need to have the hardware to do the exercise. We will assume that if your code compiles, it’s sufficient (barring any circumstantial mistakes).

After this week, we will share the results in our Discord community, where you have more instructions and details about the exercise. discord