This commit is contained in:
Fatima Idrees 2025-05-27 10:54:38 +03:00
parent b6787097fd
commit bcedcdac2f
3 changed files with 43 additions and 14 deletions

33
Documentation/README.md Normal file
View File

@ -0,0 +1,33 @@
# Steps of Developing the Motor Library
---
## Version 01:
![](../Images/1.png)
Created two separate functions for testing:
- One function to turn the fan motor on or off
- Another function to set the motor speed
---
## Version 02:
![](../Images/2.png)
Combined both actions into a single function and tested the new approach.
---
## Version 03:
![](../Images/4.png)
Updated the speed control to use a percentage value.
The function now converts the percentage to a value between 0 and 1023 using PWM for smoother speed control.
---
## Usage Example:
![](../Images/5.png)
A way to test the Library!

BIN
Images/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -27,7 +27,7 @@ This library makes it easy for anyone—even if you dont know how to code or
## Installation
1. **Download the Fan Motor Library:**
Download the library file above.
Download the library file from [here](FanMotor.ubl).
2. **Open MicroBlocks IDE** on your computer.
@ -53,6 +53,15 @@ This library makes it easy for anyone—even if you dont know how to code or
5. **Click the green flag** or “Run” to start controlling your fan!
---
## Example Project
![](Images/5.png)
To use the fan motor block, simply enter the pin number where your fan is connected.
Next, choose whether you want to turn the fan **on** or **off**.
Finally, set the motor speed as a percentage (%) to control how fast the fan spins.
---
## Troubleshooting
@ -69,18 +78,5 @@ This library makes it easy for anyone—even if you dont know how to code or
---
## Contact & Support
If you have any questions or need help, feel free to:
- Email me: [fatimaxidrees@gmail.com]
---
## License
This library is open source and free to use under the [MIT License](LICENSE) made in FABLAB BH.
---
*Have fun building with your fan motor!*