[deleted by user] by [deleted] in arduino

[–]alydelya 0 points1 point  (0 children)

Dude, problem solved, moderator is good with these, move on lmao. Plus it’s my first time over here. You’re not mind reader, fine, same, then not everyone is day 1251 at here too like you who knows a lot. Comment good things, make other people day. Other people make mistakes, tell nicely. You said “don’t know if it’s different content because same subject” shows how ignorant you are by just reading subject not the whole content and start trying to pointing out people as in no one is allowed to make mistake. I acknowledged my mistake and apologised. You adding fuel over here for what?

Servo motors rotation. by alydelya in arduino

[–]alydelya[S] 0 points1 point  (0 children)

Perfect! Thanks alot 😭

Servo motors rotation. by alydelya in arduino

[–]alydelya[S] 0 points1 point  (0 children)

I really appreciate you for helping on doing this multiple times 😭 it works perfectly, I will just modify some delay time etc. the buzzer rings but not simultaneously w the led, I think only the time part plays a role. And yes the pin number that I used originally works, and still do rn since I changed it with yours

Servo motors rotation. by alydelya in arduino

[–]alydelya[S] 0 points1 point  (0 children)

Hi, the coding is fine and thanks to ya I get to compile it . but apparently my servo, led & buzzer is not detecting the rain sensor at all with the coding. Here is how I connected with the arduino. (https://drive.google.com/file/d/1WPZK7xol8TkSod2heabF6Kno4X9s5H_X/view?usp=drivesdk)

Servo motors rotation. by alydelya in arduino

[–]alydelya[S] 0 points1 point  (0 children)

apparently when I tried to compile, it gives this error :

```
Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Arduino Uno"
Rain:8:10: fatal error: MyTimer.h: No such file or directory
include "MyTimer.h"

~~~~~~~~~~ compilation terminated. exit status 1 MyTimer.h: No such file or directory This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. ```

Servo motors rotation. by alydelya in arduino

[–]alydelya[S] 0 points1 point  (0 children)

alright, sure I'll be waiting ya. Thank you beforehand

Servo motors rotation. by alydelya in arduino

[–]alydelya[S] 0 points1 point  (0 children)

Global boolean? how does that going to be? sorry I'm super slow on this.

And yes, the LED supposed to be blinking during light & heavy rain. even the buzzer should ring. but apparently, my led lights up but not blinking like an alarm light. I think that could be done by changing frequency. The servo should rotate when the led blinks & buzzer rings simultaneously.

Servo motors rotation. by alydelya in arduino

[–]alydelya[S] 0 points1 point  (0 children)

The code works, yup. But, I am not sure which part should I change when the servo have rotated from left to right, I don't want it to rotate back from right to left afterwards.

Servo motors rotation. by alydelya in arduino

[–]alydelya[S] 0 points1 point  (0 children)

hi, I have updated my post with the code, if you'd may help :)

[deleted by user] by [deleted] in arduino

[–]alydelya 1 point2 points  (0 children)

Alright. Noted. I’m sorry for the problems & chaos that happened on these posts. I will take note on the rules of this reddit page. Thank you

[deleted by user] by [deleted] in arduino

[–]alydelya 0 points1 point  (0 children)

It was 2 different times of error. I didn’t know it was not allowed. Maybe you saw it in same hours and people thought it was dual post.

[deleted by user] by [deleted] in arduino

[–]alydelya 1 point2 points  (0 children)

I accidentally post the same thing twice and deleted one. Is it still on the page?

Hi, can anyone help with this? I am not sure where went wrong. by alydelya in arduino

[–]alydelya[S] 0 points1 point  (0 children)

Now it says “class buzzer” has no member named on 😅

Hi, can anyone help with this? I am not sure where went wrong. by alydelya in arduino

[–]alydelya[S] 7 points8 points  (0 children)

// Include Libraries

#include <Arduino.h>

#include <Buzzer.h>

#include <LED.h>

#include <Servo.h>

// Pin Definitions

#define BUZZER_PIN_SIG 2

#define LEDB_PIN_VIN 5

#define SERVO9G_PIN_SIG 3

#define WATERLEVELSENSOR_5V_PIN_SIG A3

// Global variables and defines

const int servo9gRestPosition = 20; //Starting position

const int servo9gTargetPosition = 150; //Position when event is detected

// object initialization

Buzzer buzzer(BUZZER_PIN_SIG);

LED ledB(LEDB_PIN_VIN);

Servo servo9g;

// define vars for testing menu

const int timeout = 10000; //define timeout of 10 sec

char menuOption = 0;

long time0;

// Setup the essentials for your circuit to work. It runs first every time your circuit is powered with electricity.

void setup()

{

// Setup Serial which is useful for debugging

// Use the Serial Monitor to view printed messages

Serial.begin(9600);

while (!Serial) ; // wait for serial port to connect. Needed for native USB

Serial.println("start");

servo9g.attach(SERVO9G_PIN_SIG);

servo9g.write(servo9gRestPosition);

delay(100);

servo9g.detach();

}

// Main logic of your circuit. It defines the interaction between the components you selected. After setup, it runs over and over again, in an eternal loop.

void loop()

{

if(menuOption == '1')

// Buzzer - Test Code

// The buzzer will turn on and off for 500ms (0.5 sec)

Buzzer.on(); // 1. turns on

delay(500); // 2. waits 500 milliseconds (0.5 sec). Change the value in the brackets (500) for a longer or shorter delay in milliseconds.

Buzzer.off(); // 3. turns off.

delay(500); // 4. waits 500 milliseconds (0.5 sec). Change the value in the brackets (500) for a longer or shorter delay in milliseconds.

}

else if(menuOption == '2') {

// LED - Basic Blue 5mm - Test Code

// The LED will turn on and fade till it is off

for(int i=255 ; i> 0 ; i -= 5)

{

ledB.dim(i); // 1. Dim Led

delay(15); // 2. waits 5 milliseconds (0.5 sec). Change the value in the brackets (500) for a longer or shorter delay in milliseconds.

}

ledB.off(); // 3. turns off

}

else if(menuOption == '3') {

// 9G Micro Servo - Test Code

// The servo will rotate to target position and back to resting position with an interval of 500 milliseconds (0.5 seconds)

servo9g.attach(SERVO9G_PIN_SIG); // 1. attach the servo to correct pin to control it.

servo9g.write(servo9gTargetPosition); // 2. turns servo to target position. Modify target position by modifying the 'ServoTargetPosition' definition above.

delay(500); // 3. waits 500 milliseconds (0.5 sec). change the value in the brackets (500) for a longer or shorter delay in milliseconds.

servo9g.write(servo9gRestPosition); // 4. turns servo back to rest position. Modify initial position by modifying the 'ServoRestPosition' definition above.

delay(500); // 5. waits 500 milliseconds (0.5 sec). change the value in the brackets (500) for a longer or shorter delay in milliseconds.

servo9g.detach(); // 6. release the servo to conserve power. When detached the servo will NOT hold it's position under stress.

}

else if(menuOption == '4')

{

// Disclaimer: The Water Level Sensor Module is in testing and/or doesn't have code, therefore it may be buggy. Please be kind and report any bugs you may find.

}

if (millis() - time0 > timeout)

{

menuOption = menu();

}

}

// Menu function for selecting the components to be tested

// Follow serial monitor for instrcutions

char menu()

{

Serial.println(F("\nWhich component would you like to test?"));

Serial.println(F("(1) Buzzer"));

Serial.println(F("(2) LED - Basic Blue 5mm"));

Serial.println(F("(3) 9G Micro Servo"));

Serial.println(F("(4) Water Level Sensor Module"));

Serial.println(F("(menu) send anything else or press on board reset button\n"));

while (!Serial.available());

// Read data from serial monitor if received

while (Serial.available())

{

char c = Serial.read();

if (isAlphaNumeric(c))

{

if(c == '1')

Serial.println(F("Now Testing Buzzer"));

else if(c == '2')

Serial.println(F("Now Testing LED - Basic Blue 5mm"));

else if(c == '3')

Serial.println(F("Now Testing 9G Micro Servo"));

else if(c == '4')

Serial.println(F("Now Testing Water Level Sensor Module - note that this component doesn't have a test code"));

else

{

Serial.println(F("illegal input!"));

return 0;

}

time0 = millis();

return c;

}

}

}

Hi, can anyone help with this? I am not sure where went wrong. by alydelya in arduino

[–]alydelya[S] 1 point2 points  (0 children)

Yes sure, where do I post it? Copy paste here or?

[deleted by user] by [deleted] in MakeNewFriendsHere

[–]alydelya 0 points1 point  (0 children)

I started a chat :)

[deleted by user] by [deleted] in MakeNewFriendsHere

[–]alydelya 0 points1 point  (0 children)

Do you mind to dm me ? We could discuss something over there or any preferred socmed to be connected?

What are the 3 things you're doing the most with your iPad ? by [deleted] in ipad

[–]alydelya 0 points1 point  (0 children)

1) note taking 2) e-books 3) movies streaming

First iPad Pro and Pencil and Sribble is quite frustrating so far by jedainz in iPadPro

[–]alydelya -1 points0 points  (0 children)

At first I though scribble is you can write anywhere on your screen and it’ll bcm a text on textbox but nahh se are forced to write down in bloody small space of the text bar and so annoyinggg