Recent Posts

Pages: [1] 2 3 ... 10
Project Guidance / Re: How to keep powersupply/st...
Last post by srnet - Today at 10:05 pm
With arduino nano connected output is 5.08v, then after 3 seconds or so it drops for a fraction of a second below 4v and back to 5.08v rebooting the nano
So when this is happening, how much current is flowing into the nano ?
The problem isn't particularly complicated but unfortunately I think your current starting point is a bit too complex for your current level of understanding. It's always difficult modifying code that you don't really understand.

It may be better initially to write a simple program which just sends a given note for each key/button.

When that's working you can add on transposition which is just getting a number via your up/down keys then adding that number to the note number you would have sent. You already have the code that does most of that.

When that's working you can look at adding other functions, perhaps a display to show what the current transpose and perhaps key name is. But the trick is to do it all a bit at at a time and completely understand the code in each stage.

But designing and writing an electronic musical instrument from scratch is something that is going to take a lot longer than 3 days. If you don't think it's worth it then that's your decision. Shame really, it sounds like an interesting project. What was the potentiometer going to be doing?

Just edited it now, hope that clears things up a bit, sorry
Español / Re: DC motor - Sensor PIR y 2 ...
Last post by echigard - Today at 10:02 pm
Estoy de vuelta
Seguí los datos que gentilmente surbyte me sugirió y he trabajado bastante pero estoy en un callejón sin salida. No funciona.
Cuando comienza el sistema, el sensor calibra sus 30 segundos y está activo.
Pero aunque ningún botó esté presionado el motor gira al detectar movimiento como si el botón del PIN 9 hubiera sido presionado. Si presiono el botón del PIN 8 cambia de dirección pero solo si lo mantengo presionado, si lo suelto cambia nuevamente.
EL sensor responde pero no respeta la transisión (PAUSE TIME) para asumir LOW. Lo cual funciona sin problemas en el código del sensor separado.
Aqui adjunto el código como está ahora.

Code: [Select]
//the time we give the sensor to calibrate (10-60 secs according to the datasheet)
int calibrationTime = 30;       

//the time when the sensor outputs a low impulse
long unsigned int lowIn;
//the amount of milliseconds the sensor has to be low
//before we assume all motion has stopped
long unsigned int pause = 10000;
boolean lockLow = true;
boolean takeLowTime;
const int pirPin = 2;    //the digital pin connected to the PIR sensor's output
const int button1Pin = 8;     // the number of the pushbutton1 pin
const int button2Pin = 9;     // the number of the pushbutton2 pin
const int IN3 = 5;
const int IN4 = 4;
const int ENB = 3;   
int button1State = 0;         // variable for reading the pushbutton status
int button2State = 0;         // variable for reading the pushbutton

void setup() {

  //start serial connection
    // initialize the pushbutton pin as an input:
  pinMode(button1Pin, INPUT);     
  pinMode(button2Pin, INPUT);   
digitalWrite(button1Pin, LOW);
digitalWrite(button2Pin, LOW);
  // initialize the H-Bridge pin as an output:
 pinMode (ENB, OUTPUT);
  pinMode (IN4, OUTPUT);   
  pinMode (IN3, OUTPUT);
  digitalWrite(IN3, LOW);
  digitalWrite(IN4, LOW);
   pinMode(pirPin, INPUT);
 digitalWrite(pirPin, LOW);

  //give the sensor some time to calibrate
  Serial.print("calibrating sensor ");
    for(int i = 0; i < calibrationTime; i++){
    Serial.println(" done");
    Serial.println("SENSOR ACTIVE");

void loop() {
// read the state of the pushbutton values:
  button1State = digitalRead(button1Pin);
  button2State = digitalRead(button2Pin);

  if (digitalRead(pirPin) == HIGH && millis() > 1000) {
  if (button1State == HIGH){
        // Motor one direction
  digitalWrite (IN4, HIGH);
  digitalWrite (IN3, LOW);
   else if (digitalRead(pirPin) == HIGH && millis() > 1000) {
    if (button2State == HIGH);
    // Motor other direction
  digitalWrite (IN4, LOW);
  digitalWrite (IN3, HIGH);
    if (lockLow) {
      //makes sure we wait for a transition to LOW before any further output is made:
      lockLow = false;
      Serial.print("motion detected at ");
      Serial.print(millis() / 1000);
      Serial.println(" sec");
    takeLowTime = true;
   else if (digitalRead(pirPin) == LOW) {
    if (takeLowTime) {
      lowIn = millis();          //save the time of the transition from high to LOW
      takeLowTime = false;       //make sure this is only done at the start of a LOW phase
    //if the sensor is low for more than the given pause,
    //we assume that no more motion is going to happen
    if (!lockLow && millis() - lowIn > pause) {
      //makes sure this block of code is only executed again after
      //a new motion sequence has been detected
      lockLow = true;
      Serial.print("motion ended at ");      //output
      Serial.print((millis() - pause) / 1000);
      Serial.println(" sec");


Muchas gracias y un saludo
Software / Re: Sincronizzazione di più Ar...
Last post by Standardoil - Today at 10:01 pm
poi, non mi ornano due conti
tu dici che il master occupa il primo secondo a trasmettere " in BROADCAST informazioni riguardo il tempo passato dall'inizio dei 4 secondi e il valore dell'RTC" (dal post 17)
ostia, a 9600 bps un secondo significa qualcosa come 1000 byte trasmessi (grosso modo), anche contando il mezzo secondo che ci mettono gli HC12 a cominciare la trasmissione a partire del modo di minimo consumo (ammettendo che tu tenga sempre nel modo di minimo consumo, e non li mandi semplicemente in sleep quando servono)
dicevo, anche contando quel mezzo secono, ti avanza comunque tempo per trasmettere 500 byte,
secondo me basta trasmettere 4 byte con minuto e secondo in chiaro, nemmeno in decimale ma in ascii, e con 4 millisecondi te la sei cavata, boh, non mi è chiaro
inoltre al post 4 dici due cose "strane"
1) devi avvisare il nodo centrale che il nodo periferico si è svegliato: il nodo centrale lo sa automaticamente appena riceve la trasmissione dei dati, non serve avvisarlo
2) hai necessita che i pacchetti vadano a destinazione senza interferenze e non te la senti ti toccare la libreria: OK, capisco e condivido, ma sorella della libreria che usi c'è la RH_reliabledatagram (o un nome del genere) che fa da lei quello che ti serve, senza bisogno di toccare nulla
io quelle librerie non le ho mai usate, mi sono divertito di più a farlo da me, ma se ci sono e ti tornano comode.... oltretutto che ne sta già usando alcune
Exhibition / Gallery / Re: ROM-Reader for Super Ninte...
Last post by sanni - Today at 10:01 pm
I can write them just fine but there is one setting called "margin mode" that ensures that they are written properly for like long term and I haven't integrated that yet since it needs 12V on pin 9. I have however designed a new flash adapter pcb with that in mind but I have not ordered it. It's on low priority right now.

The Arduino Megas I ordered came yesterday too, so as soon as I have the time I'll build some cart readers and test for reliability, hopefully I can also make a video about the build process and upload it to youtube.

Are you using a step-down gearbox with the motor.

PS. I just noticed in your Original Post that your project is due on 28th May 2018.   Sorry - starting from where you are now that won't happen.
Yes i am using a speed reductor with the motor.

Yeah i know that is the reality, but if i cant figure this out i will present it for just 1 of the motors. Its just this part of the project which is missing. So i am trying to complete this part too..


I will use 10 turn potentiometer directly connected to the shaft of the motor.  There are multiturn potentiometers as i found..
Many of the GSM 'modules' have extra process capability internally...

e.g. LUA built into the modem may eliminate the need for an external cpu in simple projects...?
Deutsch / Re: Grundlegendes zur Hausauto...
Last post by HotSystems - Today at 09:59 pm
Und das möchtest du mit einem Arduino umsetzen ?

Ich würde es in diesem Fall Modulweise abarbeiten.
Und für jedes Modul einen eigenen Controller die per Datenverbindung (RS485 oder I2C) gesteuert werden.

Da die üblichen Funksteckdosen mit einfachen 433 MHz Empfängern arbeiten, sind die nötigen Funkmodule festgelegt und dann auch eine ausreichende Reichweite erzielt werden kann.

Eine Alternative ist WLan, auch da gibt es entsprechende Funksteckdosen. Wie es da mit der Reichweite aussieht, kann ich nichtsagen.
Nederlands / Re: Arduino UNO as ISP, bootlo...
Last post by Harrewar - Today at 09:59 pm
Een shieldje, dat is een goed idee. Jouw shield lijkt op: met dan nog een extra voetje.
Ik heb de spulletjes wel vermoed ik, maar ik ga eerst maar eens studeren op wat fuses zijn. Dat ik een beetje begrijp wat ik doe. (en de resultaten kan interpreteren natuurlijk) De link helpt me aardig op weg vermoed ik.
Bedankt voor je tip!
Pages: [1] 2 3 ... 10