Can an HC-05 Bluetooth module be used as an audio receiver? Answered

Of course there are specific BT audio receivers, but I like to save money.... 

Question by DangerousTim   |  last reply

Interfacing HC 05 with Atmega?

Somebody please tell me the code to turn ON and OFF a Led on atmega8 board using hc 05 Bluetooth module Some what like this

Question by Mayoogh_Girish   |  last reply

Hc-05 and Arduino connection

Hello to everyone.I have make a bleutooth robot which i can control it via android(tablet) and i have a problem with the code.I want from the robot to stop when connection lost or bluetooth disconnected.Now when the connection lost the robot go ahead and falls on the objects.How to add this line on the code?Can you help me please?The STATE pin of HC-05 when is HIGH is connected and when is LOW is disconnected.I put this on my code but it doesn't stop.Thank you for your time The bluetooth that i use is HC-05 My code: #include Servo SERVO_1; // Initialize Servo1 // Motor Control Variables int PWM1 = 9; int ENABLE1 = 8; int PWM2 = 5; int ENABLE2 = 7; int PWM3 = 3; int ENABLE3 = 4; int PWM4 = 6; int ENABLE4 = 12; int STATE=2; void setup() {   SERVO_1.attach(10);   Serial.begin(9600);   pinMode(ENABLE1, OUTPUT);  //Δήλωση όλων των μεταβλητών ως έξοδος   pinMode(ENABLE2, OUTPUT);  //Δήλωση όλων των μεταβλητών ως έξοδος   pinMode(ENABLE3, OUTPUT);  //Δήλωση όλων των μεταβλητών ως έξοδος   pinMode(ENABLE4, OUTPUT);  //Δήλωση όλων των μεταβλητών ως έξοδος   pinMode(STATE, INPUT); } void loop() {    if(digitalRead(STATE)== HIGH)   // see if there's incoming serial data:   if (Serial.available() > 0) {     // read the oldest byte in the serial buffer:     int incomingByte =;     // action depending on the instruction     // as well as sending a confirmation back to the app     switch (incomingByte) {       case 'F':         moveForward();         Serial.println("Going forward");         break;       case 'L' : // Case 'L' is received,         SERVO_1.write (180); // Στρίψε Αριστερά.         SERVO_1.attach(10);         break;       case 'N':         turnright();         Serial.println("Turning right");         break;       case 'M':         turnleft();         Serial.println("Turning left");         break;       case 'O' : // Case 'L' is received,         SERVO_1.write (0); // Στρίψε Αριστερά.         SERVO_1.attach(10);         break;       case 'B':         moveBackward();         Serial.println("Going forward");         break;       case 'P':         SERVO_1.write(90); // Στρίψε Αριστερά.         SERVO_1.attach(10);         break;       case 'S':         moveNone();         Serial.println("Stopping");         break;       default:         // if nothing matches, do nothing         break;     }   } } void moveForward() {   // turn the driving motor on to go forwards at set speed   digitalWrite(ENABLE1, HIGH);   digitalWrite(ENABLE2, HIGH);   digitalWrite(ENABLE3, HIGH);   digitalWrite(ENABLE4, HIGH);   analogWrite(PWM1, 255);   analogWrite(PWM2, 255);   analogWrite(PWM3, 255);   analogWrite(PWM4, 255); } void moveBackward() {   // turn the driving motor on to go backwards at set speed   digitalWrite(ENABLE1, LOW);   digitalWrite(ENABLE2, LOW);   digitalWrite(ENABLE3, LOW);   digitalWrite(ENABLE4, LOW);   analogWrite(PWM1, 255);   analogWrite(PWM2, 255);   analogWrite(PWM3, 255);   analogWrite(PWM4, 255); } void turnright() {   digitalWrite(ENABLE1, HIGH);   digitalWrite(ENABLE2, HIGH);   digitalWrite(ENABLE3, LOW);   digitalWrite(ENABLE4, LOW);   analogWrite(PWM1, 255);   analogWrite(PWM2, 255);   analogWrite(PWM3, 255);   analogWrite(PWM4, 255); } void turnleft() {   digitalWrite(ENABLE1, LOW);   digitalWrite(ENABLE2, LOW);   digitalWrite(ENABLE3, HIGH);   digitalWrite(ENABLE4, HIGH);   analogWrite(PWM1, 255);   analogWrite(PWM2, 255);   analogWrite(PWM3, 255);   analogWrite(PWM4, 255); } void moveNone() {   // turn the driving motor off   digitalWrite(ENABLE1, 0);   digitalWrite(ENABLE2, 0);   digitalWrite(ENABLE3, 0);   digitalWrite(ENABLE4, 0);   analogWrite(PWM1, 0);   analogWrite(PWM2, 0);   analogWrite(PWM3, 0);   analogWrite(PWM4, 0);   SERVO_1.detach(); }

Question by dimitrakis1992   |  last reply

How to reduce range on HC-05 BT module to 3 feet only?

I'm trying to design and build a rf shield to encase the hc-05 bluetooth module in order to reduce the range adjustably. For the first use I want to reduce the range to around 3 feet. Any tips?

Question by dmagryta124   |  last reply

Can I control a robot with a wireless controller with bluetooth modules?

I'm working on a Hexapod right now, but I haven't found a way to control it wirelessly. I have tried working with nrf24L01 modules but just can't find a way for it to work.... Right now I have 2 HC-05 and 1 HC-06, can I do it? My plan is to control the hexapod (controlled by an Arduino) with a controller with another Arduino that has a joystick, along with 2 buttons to switch mode or rest mode. I'm still relatively new to Arduino so I have no idea how to search the way to control Arduinos using the 2 pins TXD and RXD. Also, which information can I send on these bluetooth modules (integer, boolean, etc)? I really appreciate if someone can help me start on how to use these things

Question by Shizen   |  last reply

Help regard ESP 8266 or HC 05? Answered

Hi guys! :3 So I'm in need of some help regarding this project According to the project, you need to reprogram the robot for every function but it would be very tedious and time consuming to program it again and again. So, I thought that it would be nice to use a HC 05 or ESP 8266 (along with arduino) with a program to control whether it's walking, kicking or dancing etc. so I could control it through my mobile. The problem is that I have zero skills on developing software for the mobile, arduino or esp. I would love it if anyone could help me by making a small program. Also, would it be better to use the Bluetooth module or ESP? I would prefer ESP as it's cheaper but not by alot so if the Bluetooth module has benefits, I can buy that. Thanks in advance. :)

Question by SA-DIY   |  last reply

How to send information between 2 HC-05? Answered

I need to send a number from 1 Arduino to another using 2 HC-05. I have followed the AT setup and connection in this video I have successfully connected 2 HC-05 module but I can't get the master to send a relatively large number to the slave. I uploaded my code and result--serial command is the slave's (Basically I want the slave to receive the number and print onto serial screen, but it doesn't happen) Another question is if I want to send 3 integers in a row (Like 23, 34, 56) and let the other receive as 3 different integers (int1=23, int2=34, int3 = 56), how do I do that? Btw, how do I suppose to upload the files to Arduino properly? When I have the TX->RX0; RX->TX1 (Bluetooth pin to Arduino pin), I can't upload the file. I have to disconnect and upload, then it seems to upload but doesn't work properly. Thanks in advance.

Question by Shizen   |  last reply

What does the "state" pin do on the HC-05 Bluetooth module?

Hi all, What is the function of the state pin on the HC-05 6-pin serial bluetooth module?

Question by dmagryta124   |  last reply

How to use Bluetooth Module - HC-05 Device as audio receiver?

I want to connect Bluetooth Module - HC-05 (or HC-06) to my home theater to receive stereo audio signal from laptop. please give me the full guidelines.

Question by smandal13   |  last reply

My HC-05 module is not converting AT command mode?

My HC-05 module is not converting in AT command mode and I am making a project Bluetooth controlled car using Arduino 16x2 lcd and HC-05 Bluetooth module and a Bluetooth controller android app  but it is still not working in my project any help?

Question by Aroojk 

Are the JY MCU and the HC 05 bluetooth module the same?

If not, how are they different? do they works with all android phones? what librabries or software do i use for controlling these with arduino???

Question by DangerousTim   |  last reply

Voltage Regulator circuit

I am trying to power Bluetooth module and the Arduino using a 9V battery. So tried to use a voltage regulator (KA7805) with 25volt 100miro farad and 63V 1 micro farad capacitors. I checked the circuit connecting these components using multimeter, it showed 5.06V as the output. But the problem comes when I connect the Bluetooth module to this output, which turns off after quickly. I checked the voltage at the bluetooth which is reducing quickly from 5V-2.5V in a matter of seconds and since the operating voltage of Bluetooth module HC-05 is 3.6V-7V, it turns off. I am not clear why this circuit behaving this way. Same output when I connected to the Arduino, it works seamlessly. Please let me know what are the mistakes that I need to rectify for this work. Thanks in advance

Topic by Bhanu Kishan 

How to power servo without driver/arduino?

Hi, I'm trying to make a servo motor spin without using a driver or micro controller, I just want to power it directly. It doesn't need to move a specific distance, or be precise. How would I wire this up? The idea is to power it on by using a HC-05 Bluetooth module, either directly, or by optocoupler. It would have to trigger the servo on whenever a Bluetooth device that has already been paired connects to the HC-05 module (in wireless range), and then off when a Bluetooth device disconnects (out of range). My idea is to use an app that automatically plays an audio file through the HC-06 when it connects (this app already exists), and that audio file happens to be the correct frequency to act as a PWM signal. Is this even possible?

Question by dmagryta124   |  last reply

Can a 9V battery power a Bluetooth module (HC-05)?

I am trying to power Bluetooth module and the Arduino using a 9V battery. So tried to use a voltage regulator (KA7805) with 25volt 100miro farad and 63V 1 micro farad capacitors. I checked the circuit connecting these components using multimeter, it showed 5.06V as the output. But the problem comes when I connect the Bluetooth module to this output, which turns off after quickly. I checked the voltage at the bluetooth which is reducing quickly from 5V-2.5V in a matter of seconds and since the operating voltage of Bluetooth module HC-05 is 3.6V-7V, it turns off. I am not clear why this circuit behaving this way. Same output when I connected to the Arduino, it works seamlessly. Please let me know what are the mistakes that I need to rectify for this work. Thanks in advance

Question by Bhanu Kishan   |  last reply

help me

How can you increase a bluetooth module range(hc 05)???i know it range around 10m.I want it to be 50m because i need it for a rc plane project.

Topic by Alexander heron the inventor   |  last reply

Arduino bluetooth HC-05 game controller to control Android games

I got a new project to make a pretty unconventional (fitness) game controller using Arduino to control Android games. The ideea is the following: using the Android VR technology (Cardboard or Dive) it was pretty simple to create a basic game (3d world to walk around) using Unity3D and Dive SDK. If you put on the Google Cardboard, the VR experience begins. But still so few devices are on the market, which give you back the control over your smartphone, which now is fixed in front of your eyes. I want to use this and make a fitness app which will be controlled by running on a treadmill (or using a workout bike). Something like the old Nintendo Wii and the running game from Sports. Or a game like Temple Run, in which running the treadmill faster, gets you faster in the game. For this I would like to create a game controller which records the leg movements, direction, body position, etc. which would then influence the actions in the game. A lot of details I still need to work out. So the question is, does anybody know of a guide or tutorial on how to create a game controller like this, using an Arduino a bluetooth module like HC-05. The controller should not be bound to a specific game or 3rd party app, should work like a usual game controller for android (connecting to some bluetooth android game profile?). There are many android game controllers out there which dont need a special android driver/3rd app to control any game. So this has to work somehow. So how can I programm an Arduino to send (once paired) the same events a bluetooth gamecontroller (or bt keyboard or mouse) sends, which doesn't need any 3'rd party Android app to be able to send basic key pressed events to a random game. Best regards, F

Topic by fcfelix   |  last reply

Code for controlling the brightness of LED using Bluetooth module HC-05-v1.0?

I am using arduino ATmega328 micro-controller. i tried some analog coding to control the brightness via Bluetooth module but the output value of the LED is constant. The code I used is, int ledPin = 5;  int fadeValue = 0; void setup() {     pinMode(ledPin,OUTPUT);     Serial.begin(9600);     delay(100); } void loop() {   // fade in from min to max in increments of 5 points:     if (Serial.available() > 0)     {            fadeValue = (int);            Serial.println(fadeValue-48);            for(int i=0;i<=fadeValue;i+=5)                analogWrite(ledPin, i);                    } }

Question by santhoshpl3   |  last reply

robot that talks back ?

Hi so i'm building a Robot controlled by voice using my android phone and HC-05 Serial Bluetooth Module(Hi so i'm building a Robot controlled by voice using my android phone and HC-05 Serial Bluetooth Module so my question is how can i make the robot talk back to me ) so my question is how can i make the robot talk back to me simple things for exemple when i talk to the robot using my phone it will say YES SIR or tell jokes 

Question by omarb22   |  last reply

About RN-42 bluetooth (with two arduino MICRO and one laptop)

Hi, there. I have a question about RN-42 bluetooth module. I want to make a bluetooth HID device (keyboard and mouse) and ,because of my direction of team project, it has two pieces. One arduino MICRO (using RN-42) is going to be master and the other MICRO (using HC-05) is going to be slave. Actually their roles can be changed! The goal is to connect RN-42 to my laptop while RN-42 is also connected to HC-05 and use this as a bluetooth keyboard. Now, Is it possible that RN-42 module has multiple connections?

Topic by 태현김3   |  last reply

Blue tooth, extra values

When using HC-05 and a bluetooth App to transmit a string like “hello” to an Arduino, I get the reading as * 12|99|99|hello# Any reason why I am getting those initial values before the string hello? How is this extra values getting into the buffer? The code is while (Serial.available()) { char inChar =; inputString += inChar; } Serial.println (inputString); inputString=””;

Topic by zigblue   |  last reply

Arduino bluetooth control

So, I've been on a project where i am trying to use a generic bluetooth gamepad to control dc motors through a HC05 bluetooth module connected to an arduino. I have no idea on where to start. I did some research about it but there dosent seem to be much information thats appropriate for this project. here is what im using now: -ipega bluetooth controller -arduino mega 2560 -HC-05 bluetooth module

Topic by thomasmanman   |  last reply

How can i separate mac & store memory in arduino ''+INQ:1D:FE:720479,7A020C,7FFF"

I want to make Door lock in a different way.please anybody suggest me,when i come back in my room, it is self unlock the door lock, use arduino & HC 05,my Bluetooth run at command mode ,at first collect the last pair Bluetooth mac and it is compared with +inq mac address ,if my phone mac is available then unlock the door automatically .

Question by nazmulmilon   |  last reply

mini drone wiring

Hello guys i'm building my first drone using the arduino pro mini , i'm following this tutorial on how to build it but i have a problem with the wiring , i've connect the battery to the arduino and also the hc-05 but i'm having problem with wiring the rest i've uploaded a picture of my wiring so far can someone please help me wiring the rest. thanks!

Topic by omarb22 

newbie - how does a qaudcopter work?

Hey there, I am thinking of building a quad copter, but am not quite sure, how they work, hopefully someone can clarify this for me.  Do all the motors connected run at the same speed, then  to move directions you increase the speed of the motor that deals with that direction. For example left control button will increase the speed for the left motor causing it to move left? Also will I be able to get a working prototype using those components below? 4 x 7mm Brushed Motors 4 x propellers. 1 x Arduin UNO  1 x HC-05 Arduino bluetooth module Am planning on dealing with the controls by writing a android app that sends command to the Bluetooth module on the arduino. 

Topic by Raphael1   |  last reply

How to make a app and program that triggers 3 led modes... on/Off , Blink , Fade ?

I have makes an Avengers Infinity War style Iron Man Arc Reactor From Arduino Uno R3, 21 Blue LEDs, Some Cardboard , Acrylic Glass/Plexiglass (To Make An Glowing Arc Reactor , And I Am A Noob and want to make an Android app that Control my Arc reactor in 3 ways Blink,FADE,On/Off via Bluetooth Please Help And I Have All 3 Codes To Run Individually (Blink/Fade/On/Off) but I can't figure out how to run them from android appAndroid app can Be Made With MIT App Inventer

Question by ANIKET JOSHI 

Making a gamepad with the HC05 bluetooth module.

Hi guys! this is my first post here at Instructables :D I really hope someone will be able to help me! Basically the problem is described in the attached image. To be short, we have: - 1x smartphone (Android) - 1x bluetooth module (HC05 with breakout board GW-040 4 pin SPI) - some buttons and arrows... I've already managed to get the HC05 recognized by Windows as a gamepad (modifying the tag using AT commands). The real problem is that i'm stuck with that. I would like to understand how i can connect some buttons (let's say four) that will actually behave like arrows while playing. As far as i understood i need to use the PIO pins but unfortunately my knowledge stops here. Theoretically the code behind this is simple: when the button is pressed the circuit is close and a signal is received by the HC05 who sends the corresponding command via bluetooth. So if the up arrow is pressed, that pin will receive 1 (closed circuit) and the HC05 will send "UP_Arrow" as an instruction to the smartphone. The problem is how do i write down this code and put it into the HC05? since the gamepad tag is "universal" i guess there is some default code for things like this. I think it's the same thing they did with the MOGA... I also read that i could need a SPI-USB Download (something like this ) to use the BlueSuite, that seems like the software needed for this operation. Thanks for any advice!! P.S.: Some useful links i found while searching..

Topic by HarryValenti   |  last reply

Turn my Raspberry Pi 0W into a bluetooth HID gamepad

Hello there ! I've been trying to get through this for weeks... many projects are quite similar but I have never found one that answers my problem. As the title says, I want to turn my Raspeberry Pi 0 W into a bluetooth HID gamepad. I figured out that another way is possible. Indeed you can create your own bluetooth HID device with either the Adafruit BlueFruit Ez-Key or a the RN-42 module (or even the HC-05 with the RN-42 firmware). But I want neither of these solutions. I want to use my Raspberry Pi 0 W in a way that it will be recognized as a bluetooth gamepad. Creating the gamepad is fine, I used the GPIO of the Pi for the inputs. But once the gamepad is physically done, how to make my Pi appear as a gamepad ? I've seen that you can use hciconfig in the terminal of Raspbian in order to change the class of the Pi and set it as a gamepad but I must admit that I didn't understand everything. And it's important that it appears as a gamepad and not as a keyboard. In a nutshell, I would like to turn my old wired nes controller in a bluetooth one, and play on another Pi where Recalbox is installed. (That's why you must appear as a gamepad and not as a keyboard, because Recalbox only works with bluetooth gamepads). Thank you in advance if someone takes his time to help me with this because I can't take it anymore haha ! 

Topic by frowngo 

Converting delay to millis.? need help !!!! Answered

/* * Hi Everyone.  I am just starting with Arduino uno. I was wondering if you could help me? I would like to replace "delay" with  "millis()"   My Project Out Line. *  "LED Light" On/Off with delay using "Relay Module" and "Bluetooth Hc-05" *   working fine with "delay sketch" but I cannot schedule 2 Events at the same time. *   So remodifing sketch using "Millis" *   original sketch link:   what will happen is when I send a command A to H the relay will be switched on and if I send a to h the relay will be switched off.   I have programmed it so that   A is relay one on (latched)   B is relay two on (latched)   C is relay one on for 30 Minutes   D is relay two on for 1 Hr   E is relay one on for 2 Hrs   F is relay two on for 5 Hrs   G is relay one on for 1 second, then relay two on then both off   H will switch relay one on and off for 1000 times   the relays switch on when the digital pin is grounded. and the relay switches off when the digital pin goes high   here is the code */ //========================================== // On and Off Times (as int, max=32secs) const unsigned int onTime = 1000; const unsigned int offTime = 500; // Tracks the last time event fired unsigned long previousMillis = 0; // Interval is how long we wait int interval = onTime; // Used to track if LED should be on or off boolean LED2state = true; //========================================== char val;         // variable to receive data from the serial port int ledpin = 2;  // LED connected to pin 2 (on-board LED) const int LED = 13; //  ####### Setup ####### void setup() {   pinMode(ledpin = 2, OUTPUT); // pin 2 (on-board LED) as OUTPUT   pinMode(ledpin = 3, OUTPUT); // pin 3 (on-board LED) as OUTPUT   Serial.begin(9600);       // start serial communication at 115200bps   pinMode(LED, OUTPUT); } //  ####### loop ####### void loop() {   if ( Serial.available() )      // if data is available to read   {     ;   }   val =;         // read it and store it in 'val'   //  #####  Simple LED ON/OFF with out Delay #####   if ( val == 'a' )              // if 'a' was received led 2 is switched off   {     digitalWrite(ledpin = 2, HIGH);    // turn Off pin 2   }   if ( val == 'A' )              // if 'A' was received led 2 on   {     digitalWrite(ledpin = 2, LOW);  // turn ON pin 2   }   if ( val == 'b' )              // if 'b' was received led 3 is switched off   {     digitalWrite(ledpin = 3, HIGH);    // turn Off pin 3   }   if ( val == 'B' )              // if 'B' was received led 3 on   {     digitalWrite(ledpin = 3, LOW);  // turn ON pin 3   } //else (ledpin = 3, LOW)        //set led pin 3 to low state   // Need Help   //  #####  Simple LED ON/OFF with Delay using Millis #####   if ( val == 'C' )              // if 'C' was received led 2 on for 30 Minutes   {     digitalWrite(ledpin = 2, LOW);  // turn ON pin 2     // Grab snapshot of current time, this keeps all timing     // consistent, regardless of how much code is inside the next if-statement     unsigned long currentMillis = millis();     // Compare to previous capture to see if enough time has passed     ((unsigned long)(currentMillis - previousMillis) >= interval); {       // Change wait interval, based on current LED state       if (LED2state) {         // LED is currently on, set time to stay off         interval = offTime;       } else {         // LED is currently off, set time to stay on         interval = onTime;       }       // Toggle the LED's state, Fancy, eh!?       LED2state = !(LED2state);       // Save the current time to compare "later"       previousMillis = currentMillis;       // wait 30 Minutes       digitalWrite(ledpin, HIGH);      // turn Off pin 2     }   } } //Thanks in advance  //Krish

Question by bvamsikr   |  last reply

Arduino heating controller: solar panel, oil burner, stove. NEED HELP AND ADVICE

HI this is my first time with arduino and electronics so please be forgiving.i want to make a controller for my home heating system and if it possible be able to control (change temp. setting, see statistic, etc. by phone - Bluetooth).so, i have three source of heat: solar panels (water), oil burner, wet stove. first part of plan is to connect all electrical components correctly (to make sure nothing blowup), second step is the program. third connect controller with phone by android or have a option to send sms to turn on/off oil burner.let's startthe heating system should looks like that (photo attach)please don't focus on the plumbing (that's only sketch), electronic and programing is more important.program (second step) should do:1. if T5 >T2 pomp P2 work 2. if T3>55'C , P3 work but only if O1 is switch off (automatically P1 and M1 is off, because they will be connect directly to O1 power) 3. option to on/off O1 by click on the phone (or by modul GSM in the future e.g sim800L) 4. additionally options 2 and 3 they are conditioned by other sub-option of 5 zones (where hot waterwill flow, so what will be heat): a)olny hot water in the tank- M3 open, b)only underfoor h.- M2 open, c)only radiators- M4 open, d) all heating, no tank- M2 i M3 open, e) all M2 M3 M4 open. so, before turn on O1 start making fire T3, one of the zone have to be pre-sellect.also if T1 >60st.C (and O1 and P3 are off), P4 will turn on (dump extra hot water to underfloor h.).that's all, nothing more .... but it's to much complicate for me right now. :smiley-confuse: and third part: all should be controll by simple phone app (android) e.g. turn on/off oil burner (maybe timer), change temp. in tank, change zone, see statistics etc.thera are elements what i have already- arduino nano-logging data module-relay 8 ports-bluetooth modul At-09, ble-4.0-extension board nano v3.0- temp. sensors DS18B20 i connect everything by all info what i've found in internet. also i tried to do simulation in THINKERCAD but many of my elements are not exist in the program, stiil no win. i didnt want to connect power just in case of blow off :o this is what i already found online: about bluetooth only showing the links to proof my hour's spend in google.i think first two are the i put together all what i found and this is my first program:const int TANKSENSORT1 = A0; const int TANKSENSORT2 = A1; const int PANELSENSORT5 = A2; const int STOVESENSORT3 = A3; const int FLOORSENSORT4 = A4;const int RELAYO1 = 3; const int RELAYM2 = 4; const int RELAYM3 = 5; const int RELAYM4 = 6; const int POMP2 = 7; const int POMP3 = 8; const int POMP4 = 9;const int diffON = 6; const int diffOFF = 3;void setup(){ Serial.begin(9600);pinMode(PANELSENSORT5, INPUT); pinMode(TANKSENSORT1, INPUT); pinMode(TANKSENSORT2, INPUT); pinMode(STOVESENSORT3, INPUT); pinMode(FLOORSENSORT4, INPUT);pinMode(RELAYO1, OUTPUT); digitalWrite(RELAYO1, LOW); pinMode(RELAYM2, OUTPUT); digitalWrite(RELAYM2, LOW); pinMode(RELAYM3, OUTPUT); digitalWrite(RELAYM3, LOW); pinMode(RELAYM4, OUTPUT); digitalWrite(RELAYM4, LOW); pinMode(POMP2, OUTPUT); digitalWrite(POMP2, LOW); pinMode(POMP3, OUTPUT); digitalWrite(POMP3, LOW); pinMode(POMP4, OUTPUT); digitalWrite(POMP4, LOW);}void loop(){ float solarPanelTemperature = ((analogRead(PANELSENSORT5) / 1024.0) * 5000)/10; float hotWaterTankTemperature = ((analogRead(TANKSENSORT2) / 1024.0) * 5000)/10; if(solarPanelTemperature > (hotWaterTankTemperature + diffON)){ digitalWrite(POMP2, HIGH); do{ delay(250); solarPanelTemperature = ((analogRead(PANELSENSORT5) / 1024.0) * 5000)/10; hotWaterTankTemperature = ((analogRead(TANKSENSORT2) / 1024.0) * 5000)/10; }while(solarPanelTemperature > (hotWaterTankTemperature + diffOFF)); digitalWrite(POMP2, LOW);float stoveTemperature = ((analogRead(STOVESENSORT3) / 1024.0) * 5000)/10; if(stoveTemperature > 55){ digitalWrite(POMP3, HIGH); do{ delay(250); stoveTemperature = ((analogRead(STOVESENSORT3) / 1024.0) * 5000)/10; }while(stoveTemperature < (55)); digitalWrite(POMP3, LOW); // musi byc dodane autoamtyczne wylaczenie pieca O1 jesli T3>55, a jesli T3<55 piec moze byc wlaczonyfloat hotwaterTemperature = ((analogRead(TANKSENSORT1) / 1024.0) * 5000)/10; if(hotwaterTemperature > (60)){ digitalWrite(POMP4, HIGH); do{ delay(250); hotwaterTemperature = ((analogRead(TANKSENSORT1) / 1024.0) * 5000)/10; }while(hotwaterTemperature < (60)); digitalWrite(POMP4, LOW); // still system have to be sure that O1 or stove P3 not working. // if one of those is on (O1 or P3) 'heat dumping' options cant start// still missing: // bluetooth modul // or logging data modul (statistics) // before heating will be on one of the zones have to be setup.(and save) // 'life' option for changing the zones M2, M3, M4 } delay(250); }and i stuck again.i'm looking for advise about proper electronic setup and program the arduino. i believe there are many people like me looking for help, so this post will have a bigger impact.regards

Topic by eukaliptus   |  last reply