To make this fan mechanism I used 2 softwares:
Arduino IDE for coding
Arduino Bluetooth Control for connection with bluetooth
And some of electronics like:
Arduino UNO board
Bluetooth module
DC motor - OUTPUT
RGB LED - OUTPUT
Resistors
Jumbers
Breadboard
Firstly I connected the circuit like the following diagram then used pins 1&2 which are TX & RX to connect them with the bluetooth module:
RX UNO with TX Bluetooth
RX Bluetooth with TX UNO
Then uploaded the code to the board .. After that I open the app on my phone choosed to connect with Bluetooth device and choose my module then went to buttons to send the numbers in the code
Number 1 -- LED Color is Blue - Motor Speed 100
Number 2 -- LED Color is Green - Motor Speed 170
Number 3 -- LED Color is Red - Motor Speed 255
The code starts with setup my outputs pins and the speed of serial communication to be 9600 then as a loop give the user 3 options If you pressed number from 1 to 3 in the app and then it will send the number to the bluetooth module "the serial" & the output will be one of the following:
LED Color is Blue - Motor Speed 100
LED Color is Green - Motor Speed 170
LED Color is Red - Motor Speed 255
And all of that happens each 2 seconds.