Когда я нажимаю на compile, я получаю это:

"avr-objcopy.exe - Ошибка приложения

Инструкция в 0x0044c2e5 ссылается на память в 0x0044c2e5. Память не может быть написана.

Нажмите OK, чтобы прекратить программу.

Сразу же после этого:

"WerFault.exe - Ошибка приложения

Инструкция по адресу 0x67272a49 ссылается на память по адресу 0x00000001. Память не может быть написана.

Нажмите OK, чтобы прекратить программу.

Чем это вызвано? Как мне это исправить? Мне очень нужен этот код для компиляции, он на день рождения моего брата. Код в вопросе:

//**************************************************
//
// Test of playtune library for Arduino NANO
//
// L. Shustek, 31 Jan 2011, initial release.
// L. Shustek, 27 Feb 2011, new score data
//
//**************************************************


#include <Playtune.h    

// Playtune bytestream for file "happy_birthday.mid" created by MIDITONES V1.6 on Mon Aug  4 08:55:29 2014
// command line: miditonesV1.6.exe -t3 happy_birthday 
byte PROGMEM score [] = {
// Happy Birthday
4,176, 0x90,60, 1,194, 0x80, 0x90,60, 0,150, 0x91,41, 0x80, 0x90,62, 2,88, 0x92,53, 0x80, 
0x90,57, 2,88, 0x80, 0x82, 0x90,65, 0x92,53, 2,88, 0x80, 0x81, 0x82, 0x90,64, 0x91,48, 2,88, 
0x92,52, 2,88, 0x80, 0x90,60, 1,194, 0x80, 0x90,60, 0,150, 0x81, 0x82, 0x80, 0x90,36, 0x91,62, 
2,88, 0x92,52, 0x81, 0x91,58, 2,88, 0x81, 0x82, 0x91,67, 0x92,52, 2,88, 0x81, 0x80, 0x82, 0x90,65, 
0x91,41, 2,88, 0x92,53, 2,88, 0x80, 0x90,60, 1,194, 0x80, 0x90,60, 0,150, 0x81, 0x82, 0x80, 
0x90,41, 0x91,72, 2,88, 0x92,53, 0x81, 0x91,57, 2,88, 0x81, 0x82, 0x91,65, 0x92,53, 2,88, 
0x81, 0x80, 0x82, 0x90,64, 0x91,48, 2,88, 0x80, 0x81, 0x90,62, 0x91,50, 0x92,53, 2,13, 1,212, 
0x80, 0x90,70, 1,194, 0x80, 0x90,70, 0,75, 1,212, 0x80, 0x82, 0x81, 0x90,69, 0x91,41, 2,88, 
0x80, 0x90,53, 0x92,65, 2,88, 0x82, 0x81, 0x80, 0x90,67, 0x91,52, 0x92,58, 2,88, 0x80, 0x82, 0x81, 
0x90,65, 0x91,53, 0x92,57, 7,8, 0x80, 0x82, 0x81, 0xf0};
// This score contains 201 bytes, and 3 tone generators are used.
// 24 notes had to be skipped.



Playtune pt;

void setup() {

  // Enable all 3 NANO timers for notes that are output on digital pins 10, 11, and 12.
  // Those pins should be wired to 500-ohm resistors, the other ends of which should be connected together
  // to one terminal of an 8-ohm speaker.  The other terminal of the speaker should be connected to ground.  
  // No other hardware is needed!

  pt.tune_initchan (10); 
  pt.tune_initchan (11);
  pt.tune_initchan (12);
}

void loop () {
  pt.tune_playscore (score);  /* start playing */
  while (pt.tune_playing) ;   /* wait here until playing stops */
}

1 ответ1

0

Деинсталляция и переустановка программного обеспечения Arduino, казалось, работало

Всё ещё ищете ответ? Посмотрите другие вопросы с метками .