IDE foutmelding

IDE gerelateerde berichten
Berichten: 68
Geregistreerd: 21 Apr 2013, 22:48
Woonplaats: Hoorn

IDE foutmelding

Berichtdoor babbelkwebbel » 11 Apr 2021, 14:27

Beste Allemaal,

iemand een idee wat er met deze foutmelding wordt bedoeld, zie onder tussen de hekjes, er wordt wel goed ge-upload?, sketch draait (is nog in ontwikkeling!, dus nog niet klaar)
zover ik het begrijp is het iets met het flash geheugen, maar hebben we het hier over een soft of hardware probleem?.
Wie het weet mag het roepen......

Groet
Erik,



Code: Alles selecteren
#include <Wire.h>                                                                     // librabry for I2C bus
#include <SPI.h>                                                                      // librabry for SPI bus

#include <nRF24L01.h>                                                                 // librabry for NRF24L01 WiFi module driver
#include <RF24.h>                                                                     // librabry for NRF24L01 WiFi module network driver
RF24 radio(9, 10);                                                                    // making object for NRF24L01 WiFi module (constructor is CE = 9 / CSN = 10) > radio
const uint8_t address[6] = "00100";                                                   // create a array with a 40 bit adress 

#include <AM2320.h>                                                                   // librabry for AM2320 temprature / humidity sensor                                             
AM2320 th;                                                                            // making a object for MA2320 sensor > th

#include <Adafruit_GFX.h>                                                             // Librabry Adafruit graphic
#include <Adafruit_SSD1306.h>                                                         // Librabry Adafruit display driver
#define SCREEN_WIDTH 128                                                              // set OLED display width,  in pixels
#define SCREEN_HEIGHT 64                                                              // set OLED display height, in pixels
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT);                                // making a object for Oled display > display

#include <RTClib.h>                                                                   // librabry for RTC DS3230
RTC_DS3231 rtc;                                                                       // making object for RTC > rtc

uint8_t relay = 8;                                                                    // relay > digital 8
uint8_t run_once = 0;                                                                 // set variable run once to 0, to make sure that routine runs once

uint32_t timer_display_refresh;                                                       // software timer for oled refresh
uint32_t timer_display_refresh_old;                                                   // software timer for oled refresh
uint32_t timer_display_refresh_delay = 1000;                                          // software timer for oled refresh, time is set to 1000 milli seconds

char* text [] = {" ", "Aan", "Uit"};                                                  // array with text

int index;                                                                            // variable index, is the index pointer for the character array
uint8_t text_blink = 0;                                                               // variable text blink
uint16_t time_date [9][12] = {};


bool update_boiler = false;
bool update_time_date = false;

uint8_t temp_humi [] = {th.h, th.t};

uint8_t update_counter = 2;





void setup()                                                                          // void setup runs once
{
  Serial.begin(115200);                                                               // start serial interface
 
  radio.begin();                                                                      // start radio communication (NRF24L01)
  radio.openWritingPipe(address);                                                     // open a writing pipe (NRF24L01)
  radio.setPALevel(RF24_PA_MIN);                                                      // set transmiting power to minimum (NRF24L01)
  // radio.setChannel();                   ###############################
  radio.stopListening();                                                              // stop radio communication (NRF24L01)
 
 
  Wire.begin();                                                                       // start I2C interface
  rtc.begin();                                                                        // start RTC ds3230
 
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);                                          // start display driver at adress 0x3C
  display.clearDisplay();                                                             // display clear function
  display.display();                                                                  // display refresh content
 
  pinMode(relay, OUTPUT);                                                             // set digital 8 to be output
  digitalWrite(relay, LOW);                                                           // set digital 8 output to be low
     rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));                                  // to set rtc time and date, needs only once!
}

void loop()                                                                           // void loop runs over and over again
{
  DateTime now = rtc.now();                                                           // make object rtc.now
  display.setTextSize(2);                                                             // set the font size, supports sizes from 1 to 8
  display.setTextColor(WHITE);                                                        // set the color to white
  display.setCursor(0, 0);                                                            // set the coordinates to start writing text
  display.clearDisplay();                                                             // display clear function

  if (now.hour() < 10)                                                                // next lines collect the information from the realtime clock
  {
    display.setCursor(0, 0);                                                          // and prints it to the oled display
    display.print("0");
  }
  display.print(now.hour());
  display.print(":");

  if (now.minute() < 10)
  {
    display.setCursor(36, 0);
    display.print("0");
  }
  display.print(now.minute());
  display.print(":");

  if (now.second() < 10)
  {
    display.setCursor(72, 0);
    display.print("0");
  }
  display.print(now.second());

  display.setCursor(0, 18);
  if (now.day() < 10)
  {
    display.setCursor(0, 18);
    display.print("0");
  }
  display.print(now.day());
  display.print(".");

  if (now.month() < 10)
  {
    display.setCursor(36, 18);
    display.print("0");
  }

  display.print(now.month());
  display.print(".");
  display.setCursor(72, 18);
  display.print(now.year());

  display.setCursor(0, 36);
  display.print("Boiler");
  display.setCursor(80, 36);
  display.print(text[index]);

  timer_display_refresh = millis();                                                       // read millis and write to variable timer display refresh

  if (timer_display_refresh - timer_display_refresh_old >= timer_display_refresh_delay)   // software timer for oled display
  {
    timer_display_refresh_old = timer_display_refresh;

    if (text_blink == 0)                                                                  // if text blink 0 is then set index to 2
    {
      index = 2;
    }

    if (text_blink == 1)                                                                  // if text blink 1 is then toggle index variable 0 > 1, 1 > 0
    {
      if (index == 1)
      {
        index = 0;
      }
      else
      {
        index = 1;
      }
    }
    display.display();                                                                    // refresh display contens every 1000 milli second with software timer

    const char text[] = "Hello from Boiler Arduino";
    Serial.println(text);
    radio.write(&text, sizeof(text));



    th.Read();
    Serial.print("humidity: ");
    Serial.print(th.h);
    Serial.print("%, temperature: ");
    Serial.print(th.t);
    Serial.println("C");
    Serial.println("");
  }

  if ((now.hour() >=  7 && now.hour() < 10) || (now.hour() >= 17 && now.hour() < 20) && run_once == 0)   // if time is between 07:00 and 09:00 or time is between 17:00 and 19:00, switch boiler on
  {
    digitalWrite(relay, HIGH);                                                            // relay output high (boiler on)
    text_blink = 1;                                                                       // set text blink to 1, so that text will blink
    run_once = 1;                                                                         // set variable run once to 1, so that routine runs once
//    radio_send = false;                                                                   // false equals 0
  }

  if ((now.hour() >= 10 && now.hour() <= 17) || (now.hour() >= 20 || now.hour() < 7) && run_once == 1)   // if time is between 10:00 and 16:00 or time is between 20:00 and 06:00, switch boiler off
  {
    digitalWrite(relay, LOW);                                                             // relay output low (boiler off)
    text_blink = 0;                                                                       // set text blink to 0, so that text "uit" will be displayed
    run_once = 0;                                                                         // set variable run once to 0, so that routine runs once
//    radio_send = false;
  }
}


/*  void radio()
{
  if(radio_send == false)
 //  send data tree times witch a counter
 radio_send = true;
}  */



###########################################################################
dit is de foutcode die ik krijg.
###########################################################################


Arduino: 1.8.13 (Windows 10), Board: "Arduino Nano, ATmega328P (Old Bootloader)"

Sketch uses 19342 bytes (62%) of program storage space. Maximum is 30720 bytes.

Global variables use 663 bytes (32%) of dynamic memory, leaving 1385 bytes for local variables. Maximum is 2048 bytes.



avrdude: stk500_paged_load(): (a) protocol error, expect=0x10, resp=0xbc

avrdude: stk500_cmd(): programmer is out of sync

avr_read(): error reading address 0x0000 read operation not supported for memory "flash"

avrdude: failed to read all of flash memory, rc=-2

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0xa8

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0xa8

Advertisement

Berichten: 4064
Geregistreerd: 16 Okt 2013, 14:31
Woonplaats: s hertogenbosch

Re: IDE foutmelding

Berichtdoor shooter » 11 Apr 2021, 21:02

je hebt 2 keer rf24 aan het inladen dat zal wel een conflict vormen.
paul deelen
shooter@home.nl

Berichten: 287
Geregistreerd: 15 Apr 2021, 20:05

Re: IDE foutmelding

Berichtdoor ctunes » 15 Apr 2021, 22:16

Wat probeer jij te programmeren?

Berichten: 287
Geregistreerd: 15 Apr 2021, 20:05

Re: IDE foutmelding

Berichtdoor ctunes » 11 Dec 2021, 00:16

avrdude: failed to read all of flash memory, rc=-2


U hebt de verkeerde chip geselecteerd of, indien wel, het ding is stuk waardoor uw resultaten kunnen leiden tot een zogenaamde "debugnightmare".

Berichten: 287
Geregistreerd: 15 Apr 2021, 20:05

Re: IDE foutmelding

Berichtdoor ctunes » 19 Dec 2021, 21:54

ctunes schreef:
avrdude: failed to read all of flash memory, rc=-2


U hebt de verkeerde chip geselecteerd of, indien wel, het ding is stuk waardoor uw resultaten kunnen leiden tot een zogenaamde "debugnightmare".


Die wens ik niemand toe: want ze kon wel eens de rest van "Uw leven" gaan beheersen.

Mel schreef:Don't ask.
Been there.
Done that.



https://en.wikipedia.org/wiki/The_Story_of_Mel

Terug naar Arduino IDE

Wie is er online?

Gebruikers in dit forum: Geen geregistreerde gebruikers en 6 gasten