Đã Đóng

FIND AND SOLVE PROBLEM IN ARDUINO SKECHT

hi, have a small problem in this skecht

position one:

led off, rele2 on, prele off (work ok,but have low power and not turn on the relay , ony the light in rele)

position two:

led on rele 2 off prele on ( the two rele and led is on in this point, but i need rele2 in off position )

position 3:

blink led rele off prele off (work fine)

this is the code, start from example and small mods:

This example code is in the public domain.

[login to view URL]

*/

// this constant won't change:

const int buttonPin = 2; // the pin that the pushbutton is attached to

const int ledPin = 13;

const int rele2 = 4;

const int prele = 3;

// the pin that the LED is attached to

// Variables will change:

int buttonPushCounter = 2; // counter for the number of button presses

int buttonState = 0; // current state of the button

int lastButtonState = 0; // previous state of the button

void setup() {

// initialize the button pin as a input:

pinMode(buttonPin, INPUT);

// initialize the LED as an output:

pinMode(ledPin, OUTPUT);

pinMode(prele, OUTPUT);

pinMode(rele2, OUTPUT);

// initialize serial communication:

[login to view URL](9600);

}

void loop() {

// read the pushbutton input pin:

buttonState = digitalRead(buttonPin);

// compare the buttonState to its previous state

if (buttonState != lastButtonState) {

// if the state has changed, increment the counter

if (buttonState == HIGH) {

// if the current state is HIGH then the button

// wend from off to on:

buttonPushCounter++;

[login to view URL]("on");

[login to view URL]("number of button pushes: ");

[login to view URL](buttonPushCounter);

} else {

// if the current state is LOW then the button

// wend from on to off:

[login to view URL]("off");

}

// Delay a little bit to avoid bouncing

delay(50);

}

// save the current state as the last state,

//for next time through the loop

lastButtonState = buttonState;

// turns on the LED every four button pushes by

// checking the modulo of the button push counter.

// the modulo function gives you the remainder of

// the division of two numbers:

if (buttonPushCounter % 1 == 0) {

digitalWrite(ledPin, LOW);

digitalWrite(rele2, HIGH);

digitalWrite(prele, LOW);

} else {

digitalWrite(ledPin, LOW);

digitalWrite(prele, LOW);

digitalWrite(rele2, LOW);

}

if (buttonPushCounter % 2 == 0) {

digitalWrite(ledPin, HIGH);

digitalWrite(rele2, LOW);

digitalWrite(prele, HIGH);

} else {

digitalWrite(ledPin, LOW);

digitalWrite(rele2, LOW);

digitalWrite(prele, LOW);

}

if (buttonPushCounter % 3 == 0) {

digitalWrite(rele2, LOW);

digitalWrite(prele, LOW);

digitalWrite(ledPin, HIGH);

delay(100);

digitalWrite(ledPin, LOW);

delay(100);

} else {

digitalWrite(ledPin, LOW);

digitalWrite(rele2, LOW);

digitalWrite(prele, LOW);

}

}

Kĩ năng: Arduino, Điện tử, Vi điều khiển, Kĩ thuật điện, Lập trình C

Xem nhiều hơn: find and replace text in mysql, batch script to find and replace text in a file, find and replace url in mysql database, sql query to find and replace text in a column, find and replace color in illustrator cc, find and replace url in wordpress database, excel vba find and replace string in text file, c# find and replace text in word document openxml, excel vba find and replace text in column, vba code to find and replace text in word document, find and replace text in multiple pdf files, excel vba find and replace text in a range, excel vba find and replace text in word document, javascript find and replace text in html, autocad find and replace text in multiple drawings, find and replace objects in autocad, farmer wolf goat and cabbage problem in java, farmer wolf goat and cabbage problem in c++, batch file to find and replace text in multiple files, script to find and replace text in a file

Về Bên Thuê:
( 8 nhận xét ) fresnedillas, Spain

ID dự án: #22151717

25 freelancer đang chào giá trung bình €29 cho công việc này

xeathprynx

Hello Sir/ Ma’am As a highly skilled full stack developer, I have rich experience in JAVA, C, C++, C# Python and ANDROID. I am very confident with my skills and I'd like to help your business by doing my best. My cli Thêm

€8 EUR trong 1 ngày
(75 Nhận xét)
5.3
Manoj3050

Hello Friend, I read through your project description and I have already found the issue with your code, design. I am an electronic engineer with more than 6 years of experience in Arduino development, so i can easily Thêm

€30 EUR trong 1 ngày
(29 Nhận xét)
5.1
sky19130

Hello sir. High-quality & Fast-delivery is promised! I am very confident with my skills and I'd like to help your business by doing my best. My clients have never been frustrated with my work and I hope to make you one Thêm

€200 EUR trong 7 ngày
(49 Nhận xét)
6.2
Kingstech35

Hello, thank you for your job posting. I am a senior device developer. I have plenty of experience in firmware development and micro-controller developments. I can write the firmware based on Arduino, Raspberry Pi, Pic Thêm

€55 EUR trong 1 ngày
(12 Nhận xét)
4.2
songhku925

Hello. i have completed several arduino projects on this site. if u have free time, please read my feedback related arduino. i always give good result to my employers. https://www.freelancer.com/u/songhku925?w=f do u h Thêm

€30 EUR trong 1 ngày
(4 Nhận xét)
3.8
george19921014

Hello! Nice to meet you! I have read your project carefully. I am very interested in your project. I am a Microelectronics and Automation engineering expert. I have a lot of experience on ARM, FPGA, DSP, Arduino, Raspb Thêm

€30 EUR trong 1 ngày
(7 Nhận xét)
3.9
harisjamal1995

Hello Sir I am a Mechatronics engineer and I have a lot of experience dealing with these things. I have solved this problem. I will definitely deliver your work on time. Thank you

€10 EUR trong 1 ngày
(6 Nhận xét)
3.6
stenniswood

Dear Sir, The problem is not in your sketch. The problem is that the Arduino pins cannot directly drive a relay. You need to have a transistor to "boost" the power of the digital outputs. Then the relays will turn o Thêm

€30 EUR trong 7 ngày
(2 Nhận xét)
2.7
youcefR000T

I m good at arduino projects since I worked with them and also I have good knowledge in electronics that I got from my education career

€19 EUR trong 7 ngày
(1 Nhận xét)
1.3
BassamAlghram

I am excited to work this project for you. I have experience in automation systems, you can see my portfolio "Army Car". I am recently graduated student in Mechatronics Engineering at Sana'a University . I am a member Thêm

€15 EUR trong 7 ngày
(1 Nhận xét)
1.0
Shahjehan155

Hello dear, i have seen your code and i have a vast experience in arduino projects. I am very much capable in correcting your program code so that it is according to your need. Regards: Shahjehan Sajid

€14 EUR trong 1 ngày
(0 Nhận xét)
0.0
jancu2

Sent sketch , I will fix it for you , small change, no charge

€23 EUR trong 1 ngày
(0 Nhận xét)
0.0
EmanuelCostin

Hi, I thing I got your problem. Please send me a message. I can provide support for future bugs, if needed.

€50 EUR trong 1 ngày
(0 Nhận xét)
0.0
AlfalfaSoftware

Buenas tardes, Creo que el program es faciisimo. Hay solamente un LED y 2x relés, y un boton. Veo la code pero necesito ver el esquema, puede ser un problema con los relés (hardware problem). Puede remplacer los relés Thêm

€25 EUR trong 2 ngày
(0 Nhận xét)
0.0
Ardutron

I have experience in creating pcb and electronic diagrams. I have an Instagram account related to arduino and electronics: [login to view URL] Feel free to contact me!

€25 EUR trong 3 ngày
(0 Nhận xét)
0.0
shrutikap250

Possible to do it in few hrs Relevant Skills and Experience I have good experience in debugging software code

€23 EUR trong 2 ngày
(0 Nhận xét)
0.0
imahmed67

Troubleshooting in C code is my hobby and I am doing since past 6 years and completed many projects and solve problems of many students who asked me.

€24 EUR trong 7 ngày
(0 Nhận xét)
0.0
Deyvith

At the end of the project a final sketch will be sent .ino format, a connection diagram and a video showing the operation of the program

€18 EUR trong 1 ngày
(0 Nhận xét)
0.0
Ndukwesamuelc123

I will develop the code and deploy it using Proteus software. Then I can know exactly how to solve the issue. I assure you this problem will be solved quickly.

€19 EUR trong 3 ngày
(0 Nhận xét)
0.0
VyLuu

Hello! Nice to meet you! I checked your code and find your issues. I can help you to modify your code. Hope that I can help you Thank you

€8 EUR trong 1 ngày
(0 Nhận xét)
0.0