?>

Hard Copy World

HCW

Q&A

Home > Forum >

Q&A

미세먼지 측정 코딩

페이지 정보

작성자 luckypd 메일보내기 이름으로 검색 작성일15-06-04 11:35 조회2,188회 댓글1건

본문

좋은 자료 잘 보고 있습니다...

삽질의 삽질을 거듭한끝에 먼지측정기는 완성을 했고요..

그런데 컴파일을 하다보니 이런 에러가 떠서 진전이 없습니다.

===============================================================

아두이노:1.6.5 Hourly Build 2015/06/03 06:13 (Mac OS X), 보드:"Arduino Nano, ATmega328"

In file included from AirLitmus.ino:2:0:
bitmap.h:1269: error: variable 'bitmap_array' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM const unsigned char* bitmap_array[] = {
                                           ^
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at org.fife.ui.rsyntaxtextarea.DefaultTokenPainter.paintImpl(DefaultTokenPainter.java:106)
    at org.fife.ui.rsyntaxtextarea.DefaultTokenPainter.paint(DefaultTokenPainter.java:58)
    at org.fife.ui.rsyntaxtextarea.SyntaxView.drawLine(SyntaxView.java:178)
    at org.fife.ui.rsyntaxtextarea.SyntaxView.paint(SyntaxView.java:722)
    at javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:1434)
    at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:737)
    at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:881)
    at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:860)
    at org.fife.ui.rtextarea.RTextAreaBase.paintComponent(RTextAreaBase.java:719)
    at org.fife.ui.rsyntaxtextarea.RSyntaxTextArea.paintComponent(RSyntaxTextArea.java:1993)
    at javax.swing.JComponent.paint(JComponent.java:1056)
    at javax.swing.JComponent.paintChildren(JComponent.java:889)
    at javax.swing.JComponent.paint(JComponent.java:1065)
    at javax.swing.JViewport.paint(JViewport.java:728)
    at javax.swing.JComponent.paintChildren(JComponent.java:889)
    at javax.swing.JComponent.paint(JComponent.java:1065)
    at javax.swing.JComponent.paintToOffscreen(JComponent.java:5219)
    at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1572)
    at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1495)
    at javax.swing.RepaintManager.paint(RepaintManager.java:1265)
    at javax.swing.JComponent._paintImmediately(JComponent.java:5167)
    at javax.swing.JComponent.paintImmediately(JComponent.java:4978)
    at javax.swing.RepaintManager$4.run(RepaintManager.java:824)
    at javax.swing.RepaintManager$4.run(RepaintManager.java:807)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:807)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:782)
    at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:731)
    at javax.swing.RepaintManager.access$1300(RepaintManager.java:64)
    at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1720)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
variable 'bitmap_array' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

이런 메시지가 뜨고요... 

문제는 bitmap.h 의 아래 부분입니다.

뭐가 문제일까요?

//----- You can access icon by index
PROGMEM const unsigned char* bitmap_array[] = {
ICON_BITMAP_1, ICON_BITMAP_2, ICON_BITMAP_3, ICON_BITMAP_4, ICON_BITMAP_5,     
ICON_BITMAP_6, ICON_BITMAP_7, ICON_BITMAP_8, ICON_BITMAP_9, ICON_BITMAP_10,  // ~10

ICON_BITMAP_11, ICON_BITMAP_12, ICON_BITMAP_13, ICON_BITMAP_14, ICON_BITMAP_15,     
ICON_BITMAP_16, ICON_BITMAP_17, ICON_BITMAP_18, ICON_BITMAP_19, ICON_BITMAP_20,  // ~20

ICON_BITMAP_21, ICON_BITMAP_22, ICON_BITMAP_23, ICON_BITMAP_24, ICON_BITMAP_25,     
ICON_BITMAP_26, ICON_BITMAP_27, ICON_BITMAP_28, ICON_BITMAP_29, ICON_BITMAP_30,  // ~30

ICON_BITMAP_31, ICON_BITMAP_32, ICON_BITMAP_33, ICON_BITMAP_34, ICON_BITMAP_35,     
ICON_BITMAP_36, ICON_BITMAP_37, ICON_BITMAP_38, ICON_BITMAP_39, ICON_BITMAP_40,  // ~40

ICON_BITMAP_41, ICON_BITMAP_42, ICON_BITMAP_43, ICON_BITMAP_44, ICON_BITMAP_45,     
ICON_BITMAP_46, ICON_BITMAP_47, ICON_BITMAP_48, ICON_BITMAP_49, ICON_BITMAP_50,  // ~50

ICON_BITMAP_51, ICON_BITMAP_52, ICON_BITMAP_53, ICON_BITMAP_54, ICON_BITMAP_55,     
ICON_BITMAP_56, ICON_BITMAP_57, ICON_BITMAP_58, ICON_BITMAP_59, ICON_BITMAP_60,  // ~60

ICON_BITMAP_61, ICON_BITMAP_62, ICON_BITMAP_63, ICON_BITMAP_64, ICON_BITMAP_65  // ~65
};

 

감사드립니다.

댓글목록

최고관리자님의 댓글

최고관리자 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

이 문제가 제 개발환경에서는 나타나질 않습니다. 종종 보고되고는 있는데 저도 정확한 원인을 모르겠습니다.
일단은 아두이노 개발환경 버전을 1.0.6 또는 1.0.5 버전으로 바꿔서 시도해보시고 PC를 바꿔서도 한번 컴파일 해보세요.