Recent Posts

Pages: [1] 2 3 ... 10
1
Project Guidance / Re: Reading in the data to con...
Last post by Robin2 - Today at 07:45 pm
This is the complete program
That is not the program that caused you to write this comment in Reply #2
Quote
I tried to embed example 3 in my code and get some of it working but compile doesn't accept because the
recvWithStartEndMarkers() is not recognized.
...R
2
Hello everyone!
Sorry for my bad english...
I'm trying to control brightness of led light with arduino and I want to display brightness precentage on 16x2 I2C lcd. The problem is, that 3 character number doesn't display correctly (look at the photos).
If anyone knows how to program arduino so that the number will appear correctly, please let me know.

Pictures:
https://drive.google.com/drive/folders/1SECY20wdjY2ZOWgVgZ_H0E3zQ0iVb1aI?usp=sharing
3
Project Guidance / Re: Problem with Serial inputs...
Last post by sterretje - Today at 07:43 pm
Good, so val is a global variable and hence it is remembered. Clear it in the beginning of loop() before the first if statement.

And try to stay away from String (capital S); heavy use of String will eventually result in unexpected problems at run time.
4
Did you post the "corrected" code - interrupt version? I don't see it.
The Interrupt Codes Tested using a ~54 Hz (555 based) oscillator + UNO
Code: [Select]
//#define debugSerial Serial

const int flowPin = 2;    //This is the input pin on the Arduino
volatile unsigned int PulseCount = 0; //This integer needs to be set as volatile to ensure it updates correctly during the interrupt process.
unsigned long currentTime ;
unsigned long StartTime = 0;


void setup()
{

  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
  pinMode(flowPin, INPUT_PULLUP);           //Sets the pin as an input + external 2.2K pull-up
  Serial.begin(9600);
  attachInterrupt(digitalPinToInterrupt(2), Flow, FALLING);  //Configures interrupt 0 (pin 2 on the Arduino Uno) to run the function "Flow"
  interrupts();
}

void loop()
{

 // currentTime = millis();
  if(millis() - StartTime !=1000)
  {
    ;
  }
  //(currentTime >= (StartTime + 1000)) //occurs every 1 seconds - take a reading
  else
  {
    Serial.print ("Pulse Count: ");
    Serial.println (PulseCount);
    StartTime = millis();
    PulseCount = 0;
  }
}

void Flow()
{
  PulseCount++; //Every time this function is called, increment "PulseCount" by 1
}
5
Proyectos / Interfaz Gráfica Principiante ...
Last post by onihate - Today at 07:42 pm
Buenas, Necesito alguna sugerencia, nos han mandado a hacer un trabajo en grupo de una replica de un ventilador (respirador) mecánico, en clase no tenemos ninguno porque son muy muy caros, la replica no tiene que ser funcional, pero pensé junto con mi grupo que si tuviera una pantalla como la de los respiradores de verdad seria mejor y podríamos aprender a usarlo más fácil ( estudio emergencias sanitarias por si hay algún curioso), he mirado las cosas que necesito y lo tengo claro, pero se me hace muy complicado hacer una interfaz como la de la foto que voy a poner al final. Me gustaría que me dierais algún consejo para hacer una interfaz como esa de manera fácil con algún programa o algo, pero que no sea solo una imagen sino que permita cambiar los números con botones.

Muchas gracias de antemano.
(solo pido consejos o algún vídeo fácil de entender para alguien que nunca ha usado arduino porque no los encuentro, perdón por las molestias)

https://gyazo.com/8c575ef96e9b983829a970b8541a966e
6
Deutsch / Re: Probleme mit serieller Sch...
Last post by Tommy56 - Today at 07:42 pm
Dann könntest Du mal einen USB-Sniffer versuchen.
Achtung! Bei der Installation keine USB-Tastatur und USB-Maus benutzen.
, sonst kannst Du die Installation nicht abschließen und er wird bei jedem Boot erfolglos versuchen den Treiber zu installieren.

OT: Weiß jemand, wie man solche Reste unter Win 7 entfernt?

Gruß Tommy
7
Français / Re: Capteur de température DS1...
Last post by Artouste - Today at 07:42 pm
Normalement tout est bon, j'ai beau changé de capteur rien ne marche, c'est embêtant...
bonne photo de ton montage ?
passe un coup de scanner onewire
Code: [Select]
#include <OneWire.h>

OneWire  ds(2);  //  don't forget 4.7K resistor between +5V and DQ pin
void setup(void) {
  Serial.begin(9600);

}

void loop(void) {
  byte i;
  byte present = 0;
  byte data[12];
  byte addr[8];

  if ( !ds.search(addr)) {
    Serial.println("--------------");
    Serial.println(".");
    Serial.println(".");
    Serial.println("END OF SCAN.");


    Serial.println(".");
    Serial.println();

    ds.reset_search();
    delay(2500);
    return;
  }

  Serial.println("--------------");



  Serial.print(" ROM =");

  for ( i = 0; i < 8; i++) {
    Serial.write(' ');

    if ( addr[i] < 16) {
      Serial.print("0");
    }
    Serial.print(addr[i], HEX);
  }

  if (OneWire::crc8(addr, 7) != addr[7]) {
    Serial.println("CRC is not valid!");
    return;
  }
  Serial.println();


  Serial.print("CHIP FAMILY ");
  Serial.print(addr[0], HEX);
  // the first ROM byte indicates which chip
  Serial.print(" =  ");
  switch (addr[0]) {

    case 0x01:
      Serial.println(" DS1990 DS2401");  //
      break;
    case 0x02:
      Serial.println(" DS1991");  //
      break;
    case 0x04:
      Serial.println(" DS1994");  //
      break;
    case 0x05:
      Serial.println(" DS2405");  //
      break;
    case 0x06:
      Serial.println(" DS1992");  //
      break;
    case 0x08:
      Serial.println(" DS1993");  //
      break;
    case 0x0B:
      Serial.println(" DS1985");
      break;
    case 0x10:
      Serial.println(" DS1820 DS18S20 DS1920");
      break;
    case 0x12:
      Serial.println(" DS2406");
      break;
    case 0x1D:
      Serial.println(" DS2423");
      break;
    case 0x21:
      Serial.println(" DS1921");
      break;
    case 0x22:
      Serial.println(" DS1822");
      break;
    case 0x23:
      Serial.println(" DS2433");
      break;
    case 0x24:
      Serial.println(" DS1904");
      break;
    case 0x28:
      Serial.println(" DS18B20");
      break;
    case 0x29:
      Serial.println(" DS2408");
      break;
    case 0x2C:
      Serial.println(" DS2890");
      break;
    case 0x36:
      Serial.println(" DS2740");
      break;
    case 0x3B:
      Serial.println(" DS1825");
      break;
    case 0x41:
      Serial.println(" DS1923");
      break;

    case 0xB3:
      Serial.println(" CHIP cartouche laser");
      break;
    default:
      Serial.println(" is not listed.");

      return;
  }

}


8
1) Are you providing power to the flow meter from the Arduino ?
2) Have you checked your wiring (specifically earthing)

I had a very similar issue a while back where I seemed to be getting double pulses from a device which should *not* bounce (an ESP8266 sending a pulse)
My issue was that I was powering the ESP8266 from an Arduino, and I was powering the Arduino with a battery.
Once I gave each device its own reliable power supply, the issue went away.
9
Installation & Troubleshooting / Uno won't upload
Last post by KDNXZ - Today at 07:41 pm
I am using pi-top OS (debian stretch).
I am using an official UNO board.
I have been able to upload to the board using a different computer. I don't know about this one.
Here is verbose output:
Code: [Select]
Arduino: 1.8.6 (Linux), Board: "Arduino/Genuino Uno"

/home/pi/Documents/arduino-1.8.6/arduino-builder -dump-prefs -logger=machine -hardware /home/pi/Documents/arduino-1.8.6/hardware -hardware /home/pi/.arduino15/packages -tools /home/pi/Documents/arduino-1.8.6/tools-builder -tools /home/pi/Documents/arduino-1.8.6/hardware/tools/avr -tools /home/pi/.arduino15/packages -built-in-libraries /home/pi/Documents/arduino-1.8.6/libraries -libraries /home/pi/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0X2A03_0X0043 -ide-version=10806 -build-path /tmp/arduino_build_916774 -warnings=default -build-cache /tmp/arduino_cache_158538 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=/home/pi/.arduino15/packages/arduino/tools/arduinoOTA/1.2.1 -prefs=runtime.tools.avr-gcc.path=/home/pi/.arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.avrdude.path=/home/pi/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino14 -verbose /home/pi/Arduino/Installation_Sketch_Hl2/Installation_Sketch_Hl2.ino
/home/pi/Documents/arduino-1.8.6/arduino-builder -compile -logger=machine -hardware /home/pi/Documents/arduino-1.8.6/hardware -hardware /home/pi/.arduino15/packages -tools /home/pi/Documents/arduino-1.8.6/tools-builder -tools /home/pi/Documents/arduino-1.8.6/hardware/tools/avr -tools /home/pi/.arduino15/packages -built-in-libraries /home/pi/Documents/arduino-1.8.6/libraries -libraries /home/pi/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0X2A03_0X0043 -ide-version=10806 -build-path /tmp/arduino_build_916774 -warnings=default -build-cache /tmp/arduino_cache_158538 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=/home/pi/.arduino15/packages/arduino/tools/arduinoOTA/1.2.1 -prefs=runtime.tools.avr-gcc.path=/home/pi/.arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.avrdude.path=/home/pi/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino14 -verbose /home/pi/Arduino/Installation_Sketch_Hl2/Installation_Sketch_Hl2.ino
Using board 'uno' from platform in folder: /home/pi/.arduino15/packages/arduino/hardware/avr/1.6.23
Using core 'arduino' from platform in folder: /home/pi/.arduino15/packages/arduino/hardware/avr/1.6.23
Build options changed, rebuilding all
Detecting libraries used...
/home/pi/.arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10806 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/pi/.arduino15/packages/arduino/hardware/avr/1.6.23/cores/arduino -I/home/pi/.arduino15/packages/arduino/hardware/avr/1.6.23/variants/standard /tmp/arduino_build_916774/sketch/Installation_Sketch_Hl2.ino.cpp -o /dev/null
avr-g++: error: device-specs/specs-atmega328p: No such file or directory
exit status 1
Error compiling for board Arduino/Genuino Uno.
10
Deutsch / Re: Probleme mit serieller Sch...
Last post by code723 - Today at 07:41 pm
Auch darauf achten dass du keinen Reset auslöst wenn du die serielle Schnittstelle öffnest

Interessanter Ansatz. Woran kann es liegen, das ein Reset ausgelöst wird?
Pages: [1] 2 3 ... 10