Recent Posts

Pages: [1] 2 3 ... 10
1
Displays / Re: 16x1 LCD not working as ex...
Last post by wilykat - Today at 03:58 am
I tried display and noDisplay, it's working. I couldn't get around clear for some reason.
2
Hmm.  that's a good find.   It looks like the tiny library supports print(), so probably all you have to do is figure out the initialization.   Have you tried the examples?
3
Project Guidance / Re: 64 yr old newby would like...
Last post by larryd - Today at 03:55 am
1952 baby  :)
Big pension cheque comming?




4
Quote
Code: [Select]
    if(state > NumSaves) state=0;  //reset to zero and over-write the earlier readings
I'll take "Common C++ Errors" for $100, Alex.

"When an error in logic causes data to be read from or written to 1 position past the end of an array."

*BZZZT*

What is a Fence Post Error?

Correct!

Quote
unsigned long save [41] = {};
  .....
      moveToTheNext++; if (moveToTheNext == 41) {
  .....
    for (byte i = 0; i <= 40; i ++) {
When you are using the same value (in this case the size of the save array), it is best practice to assign that value to a named constant (like SAVE_ARR_SIZE or something else descriptive) and use only that named constant in your code. That guards against unfortunate typos which could be caused by the manual retyping, and also means that changing the size of the array requires only modifying one place, rather than the 3 (at least!) places that your code requires.
5
Project Guidance / Re: Magnetometer and extras
Last post by WaterD - Today at 03:51 am
Hi P_B, to be honest, I can't make heads nor tails of the Wind Chimes code. I have a very long path ahead. My plan is to get the Dummies book tomorrow and start digging. I haven't even bought the UNO yet so need to get that ordered. Frequency range would be under 10kHz. Probably less than that. 
6
Microcontrollers / Re: arduino mkr1000
Last post by DrAzzy - Today at 03:51 am
Comparable to other WiFi devices. WiFi range is highly dependent on the local environment - interference from other nearby networks, and objects that block radio signals have a *huge* impact on it. It is not possible to give an accurate range figure for *any* WiFi device.
7
saying that it has malfunctioned. 
Probably true.
8
Hi everyone, I'm brand new to Arduino and I'm bought a large kit with an Uno so I can learn the capabilities of these things. Something I'm trying to achieve but I'm struggling to find a clear explanation of how to do it is the following:

If voltage on specific single analog pin, or a specific combination of analog pins is greater or less than a certain ADC value, then I would like to flash an LED for 5000 milliseconds of each occurrence, while simultaneously sending a constant voltage output to a relay for 5000 milliseconds for each occurrence, until the condition is no longer true.

If you were to look at my below code, you'll see that when the Uno is powered on I have the LED on pin 9 flash twice as a confirmation that the Uno is working, then pause before going to the loop, where it then checks for any of the conditions.

I'm not sure of the best way to do this, but if any of the 3 conditions exist I would like to simultaneously call the "WarningLED" function as well as the "RelayTrigger" function (right now I only have it calling "WarningLED"). I think I have the "RelayTrigger" written properly for the Relay to be triggered for 5000 millisecond each time a condition is met, but I'm not sure how to also flash the LED for the "WarningLED" function for 5000 milliseconds each time a condition is met.

Any help with this would be greatly appreciated!! Thanks so much!!

Code: [Select]

int FlashingLED = 9;  //Pin Output For LED
int Relay = 12;  //Pin Output For Relay

int ConfirmationLEDBlinkSpeed = 400;  //Delay For Confirmation LED
int LEDBlinkSpeed = 100;  //Delay For Flashing LED
int RelayDelay = 5000;  //Delay For Relay Activation

int Pin0volts = analogRead(A0);
int Pin1volts = analogRead(A1);
int Pin2volts = analogRead(A2);

int fpr = map(Pin0volts,0,1023,0,100);
int tps = map(Pin1volts,0,1023,0,100);
int afr = map(Pin2volts,0,1023,0,100);

void WarningLED()
{
  pinMode(FlashingLED,OUTPUT);
  digitalWrite(FlashingLED,HIGH);
  delay(LEDBlinkSpeed);
  digitalWrite(FlashingLED,LOW);
  delay(LEDBlinkSpeed);
}

void RelayTrigger()
{
  pinMode(Relay,OUTPUT);
  digitalWrite(Relay,HIGH);
  delay(RelayDelay);
  digitalWrite(Relay,LOW);
}

void setup() {
  pinMode(FlashingLED,OUTPUT);
  digitalWrite(FlashingLED,HIGH);
  delay(ConfirmationLEDBlinkSpeed);
  digitalWrite(FlashingLED,LOW);
  delay(ConfirmationLEDBlinkSpeed);
  digitalWrite(FlashingLED,HIGH);
  delay(ConfirmationLEDBlinkSpeed);
  digitalWrite(FlashingLED,LOW);
  delay(5000);
}

void loop() {
  if(fpr < 50 && tps < 50) WarningLED();
  if(fpr < 50 && afr < 50) WarningLED();
  if(fpr > 80) WarningLED();
}
9
General Electronics / Re: Voltage sensor
Last post by outsider - Today at 03:46 am
Watts dissipated in a load = voltage dropped across load in Volts times current flowing through it in Amps, but as GM said that wouldn't tell you much about temperature, if the wire was perfectly heat insulated so heat couldn't move away from it, it would melt pretty quick.
10
alt 234 will do it.

Paul
Or just copy and paste the characters Larry showed.


(btw, I'll be 65 ... maƱana!!)
Pages: [1] 2 3 ... 10