2015-12-16 45 views
0

我迷失在這一點,並希望有任何幫助!我從舊的GitHub下載了這個庫,我甚至無法編譯它。與shiftPWM和ATTiny85錯誤

Arduino: 1.6.6 Hourly Build 2015/10/14 10:42 (Windows 8.1), Board: "ATtiny 

x5 series, ATtiny85, 8 mhz (internal), B.O.D. Disabled" 

Warning: platform.txt from core 'Arduino SAMD (32-bits ARM Cortex-M0+) Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core. 
Warning: platform.txt from core 'ATtiny Classic' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core. 
In file included from C:\Users\Luke Bouchard\Documents\Arduino\libraries\ShiftPWM-master/ShiftPWM.h:25:0, 

       from C:\Users\Luke Bouchard\Documents\Arduino\test\test.ino:13: 

C:\Users\Luke Bouchard\Documents\Arduino\libraries\ShiftPWM-master/pins_arduino_compile_time.h:318:3: error: 'PORTC' was not declared in this scope 

    &PORTC, 

^

C:\Users\Luke Bouchard\Documents\Arduino\libraries\ShiftPWM-master/pins_arduino_compile_time.h:319:3: error: 'PORTD' was not declared in this scope 

    &PORTD, 

^

exit status 1 
Error compiling. 

    This report would have more information with 
    "Show verbose output during compilation" 
    enabled in File > Preferences. 
+0

發佈您正在嘗試編譯的代碼。 – bigjosh

回答

0

它看起來像你的圖書館不支持ATTINY85芯片。

爲了使代碼與ATTINY兼容,我不得不作出以下修改庫...

  • 減少代碼大小,以適應ATTINY FLASH有限空間內。
  • 消除SPI和串行硬件的所有依賴,因爲ATTINY沒有它們。
  • 由於ATTINY的定時器較少,因此使用現有的Timer0中斷刷新觸發器。
  • 定義ATTINY的引腳和設備映射。

我也做了一些美學改變,如在編譯時靜態分配緩衝區,因爲沒有串行連接將無法看到「內存不足」錯誤。

叉在這裏... https://github.com/bigjosh/ShiftPWM-Redux

自述包括在你的代碼進行必要的更改信息,從舊庫移動到新的(不硬)。叉子中的例子也被更新爲與新庫一起工作,所以這是一個很好的起點。

+0

作者似乎早已離去。我會如何去做這件事? – lukeb28

+0

您可以使用ATMEGA而不是ATTINY嗎?你可以使用NeoPixels而不是基於移位的LED燈條嗎? – bigjosh

+0

ATTiny85是我所有的ATM – lukeb28