Recent Posts

Pages: [1] 2 3 ... 10
1
If you look at my schematic and coding using this link it may help you understand a little better. When we press BT1 it changes from _H to _L.  On the LCD screen when the code is running you will see BT_1 BT_2 BT_3 BT_4 and POT_#####, those are for the 4 buttons and the Potentiometer.  I know how to relabel the button but we want to be able to click BT_1 and then have the potentiometer function in there where we can set the value (current) to say 1 amp then click BT_4 and output the load.

Here is the tinkercad program we are using and trying to alter.  We have no experience with Ardiuno and programming and seeking all the help we can get.  Thank you

https://www.tinkercad.com/things/bilSlPto6sN#/
2
The noise makers are in the PC. I just need a way to get output from my controller to PC
3
Quote
I  didn't find something that gets 6 Volt on input and outputs 5 Volt.
You did not look very hard. Pololu has a great selection.

They also have step-up/step-down converters that can take voltages either above or below the desired output voltage.
4
Thank you guys for the warm welcome.
As Paul said, for getting answer I should have asked good question, my bad.
Sorry as the pin is missing cause I was copying fragments of the full code just to present you with the gist.
Let me start all over again.
I am doing an LED lighting program for rooms,with option for small or large room. Toggle switch provides me the selected room by the user. The button provides the option for boosted lighting, as I want the boosted lights to be dimmed again after some time and resume the previously running cycle I want that as an interrupt. that is why I want to use the interrupt.
I am attaching the code again with the declared interrupt pin.
Code: [Select]


int i_boostButton = 2;
volatile byte vi_boostFlag = LOW;

void setup()
{
 
  pinMode(0, OUTPUT);
  pinMode(1, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, INPUT);
  pinMode(2, INPUT);
 
  attachInterrupt(i_boostButton, boostedOutput, RISING);
 }

void boostedOutput()

 
  //vi_boostFlag =! vi_boostFlag;
  vi_boostFlag = HIGH;

}

void loop()

if(digitalRead(4) == HIGH)
  {
  digitalWrite(1, LOW);
    digitalWrite(0, HIGH);
  }
 
  if(digitalRead(4) == LOW)
  {
  digitalWrite(0, LOW);
    digitalWrite(1, HIGH);
  }
 
  if(vi_boostFlag == HIGH)
  {
digitalWrite(0, LOW);
    digitalWrite(1, LOW);
    digitalWrite(3, HIGH);
    delay(5000);
    digitalWrite(3, LOW);
    vi_boostFlag = LOW;
  }
}


Please do feel free to correct me anywhere but just be a little considerate :D  its been just one month as I have started arduino learning. Thank you!
5
Français / Re: Problème lecture MPU6050
Last post by thomasetethugo - Today at 04:35 pm
Mince :/
Non je n'ai rien d'autre, je vais attendre le nouveau uno et j'espère que le probleme sera résolu !
Mais au vu de ce que tu mas dit je suppose que le probleme viens vraiment de ca !

Il est pas tout jeune cet arduino ! Il en as connus des programmes :D et j'ai surement du le cramer une fois :/
6
Generale / Re: Misuratore Ampere / Volt /...
Last post by Standardoil - Today at 04:34 pm
Ok, adesso è chiaro.
Imprevisti del genere sono sempre graditi
7
Sorry, my mistake, I copied the wrong program into my post

Try this
Code: [Select]

int max = 0;
const byte inPin = A0;

void setup()
{
  Serial.begin(115200);
  pinMode(inPin, INPUT);
}

void loop()
{
  int temp = analogRead(inPin);
  if (temp > max)
  {
    max = temp;
    Serial.print("max set to : ");
    Serial.println(max);
  }
}

The problem remains, here is a sample from the output:

Quote
max set to : 58
max set to : 127
max set to : 252
max set to : 483
max set to : 977
max set to : 1023
8
Why are you using DigitalWrite (blinking) , instead of AnalogWrite (PWM) ?
9
Deutsch / Suche eine Erklärung für die u...
Last post by xXIVXx - Today at 04:33 pm
Guten Tag :)

ich habe grade das Beispiel "Blink without Delay" mit meinem Arduino Nano ausprobiert.
Habe es ein wenig erweitert, um zu sehen wie viele Wiederholungen er in in einer Sekunde schafft.

Dabei ist mir aufgefallen, dass ich unterschiedliche werte bei verschiedenen Datentypen
bekommen habe.

Bsp:

 int zaehler=0;  --> ca. 2900 Wiederholungen

 unsigned int zaehler=0;  --> ca. 7300 Wiederholungen

 long zaehler=0;  --> ca. 227000 Wiederholungen

 unsigned long zaehler=0;  --> ca. 224000 Wiederholungen

 long zaehler=0;  --> ca. 227000 Wiederholungen


Hier noch der Code:

Code: [Select]
/*
  Blink without Delay

  Turns on and off a light emitting diode (LED) connected to a digital pin,
  without using the delay() function. This means that other code can run at the
  same time without being interrupted by the LED code.

  The circuit:
  - Use the onboard LED.
  - Note: Most Arduinos have an on-board LED you can control. On the UNO, MEGA
    and ZERO it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN
    is set to the correct LED pin independent of which board is used.
    If you want to know what pin the on-board LED is connected to on your
    Arduino model, check the Technical Specs of your board at:
    https://www.arduino.cc/en/Main/Products

  created 2005
  by David A. Mellis
  modified 8 Feb 2010
  by Paul Stoffregen
  modified 11 Nov 2013
  by Scott Fitzgerald
  modified 9 Jan 2017
  by Arturo Guadalupi

  This example code is in the public domain.

  http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay
*/

// constants won't change. Used here to set a pin number:
const int ledPin =  LED_BUILTIN;// the number of the LED pin

// Variables will change:
int ledState = LOW;             // ledState used to set the LED

//Anzahl der Wiederholungen bis der Interval erreicht ist
  int zaehler=0; // --> ca. 2900 Wiederholungen
  // unsigned int zaehler=0; // --> ca. 7300 Wiederholungen
  // long zaehler=0; // --> ca. 227000 Wiederholungen
  // unsigned long zaehler=0; // --> ca. 224000 Wiederholungen
  // long zaehler=0; // --> ca. 227000 Wiederholungen
 

// Generally, you should use "unsigned long" for variables that hold time
// The value will quickly become too large for an int to store
unsigned long previousMillis = 0;        // will store last time LED was updated

// constants won't change:
const long interval = 1000;           // interval at which to blink (milliseconds)

void setup() {
  // set the digital pin as output:
  Serial.begin(9600);
  pinMode(ledPin, OUTPUT);
}

void loop() {
  // here is where you'd put code that needs to be running all the time.

  // check to see if it's time to blink the LED; that is, if the difference
  // between the current time and last time you blinked the LED is bigger than
  // the interval at which you want to blink the LED.
  unsigned long currentMillis = millis();

  zaehler++;

  if (currentMillis - previousMillis >= interval) {
    // save the last time you blinked the LED
    previousMillis = currentMillis;
    Serial.println (zaehler);
    zaehler = 0;
   
   
    // if the LED is off turn it on and vice-versa:
    if (ledState == LOW) {
      ledState = HIGH;
    } else {
      ledState = LOW;
    }

    // set the LED with the ledState of the variable:
    digitalWrite(ledPin, ledState);
  }
}
10
Software / Re: Cambiare tonalità buzzer e...
Last post by alexxandro - Today at 04:32 pm
guardando un video dei vari cicalini sembra che quello nero che ascolto nel video ,è ideale per il mio scopo,
https://www.youtube.com/watch?v=lXpQayhGB1E
che dovrebbe essere  :BZRP2418

dice che si sente fino a 10 metri

meglio il circuito con l'altoparlante?
Pages: [1] 2 3 ... 10