نمایش نتایج: از 1 به 4 از 4

موضوع: مشکل در راه اندازی GLCD Ks0108

  1. #1
    Junior Member
    تاریخ عضویت
    Jan 2015
    نوشته ها
    10

    مشکل در راه اندازی GLCD Ks0108

    سلام خدمت اساتید محترم
    من یه برد آردینو نانو دارم و یه نمایشگر ۱۲۸*۶۴ شرکت وین استار.
    طبق لینک زیر پیش رفتم

    اما مشکل کامپایل وجود داره و خطایی که میده به شرح زیر است:
    کد:
    Arduino: 1.6.8 (Linux), Board: "Arduino Nano, ATmega328"
    
    Build options changed, rebuilding all
    In file included from /home/hamed/Desktop/Rocket/Rocket.ino:13:0:
    /home/hamed/arduino-1.6.8/libraries/ks0108/ks0108.h:32:17: error: conflicting declaration 'typedef uint8_t boolean'
     typedef uint8_t boolean;
                     ^
    In file included from sketch/Rocket.ino.cpp:1:0:
    /home/hamed/arduino-1.6.8/hardware/arduino/avr/cores/arduino/Arduino.h:117:14: error: 'boolean' has a previous declaration as 'typedef bool boolean'
     typedef bool boolean;
                  ^
    In file included from /home/hamed/arduino-1.6.8/hardware/arduino/avr/cores/arduino/Arduino.h:28:0,
                     from sketch/Rocket.ino.cpp:1:
    /home/hamed/arduino-1.6.8/libraries/ks0108/SystemFont5x7.h:41:28: error: variable 'System5x7' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
     static uint8_t System5x7[] PROGMEM = {
    
                                ^
    bitmaps.h:4: error: variable 'player' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
     static uint8_t player[] PROGMEM = {
                             ^
    bitmaps.h:10: error: variable 'gameover' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
     static uint8_t gameover[] PROGMEM = {
                               ^
    bitmaps.h:60: error: variable 'startup' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
     static uint8_t startup[] PROGMEM = {
                              ^
    bitmaps.h:130: error: variable 'ast1' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
     static uint8_t ast1[] PROGMEM = {
                           ^
    bitmaps.h:136: error: variable 'ast2' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
     static uint8_t ast2[] PROGMEM = {
                           ^
    bitmaps.h:142: error: variable 'ast3' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
     static uint8_t ast3[] PROGMEM = {
                           ^
    bitmaps.h:149: error: variable 'heart' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
     static uint8_t heart [] PROGMEM = {
                             ^
    bitmaps.h:156: error: variable 'bonus' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
     static uint8_t bonus[] PROGMEM = {
                            ^
    bitmaps.h:171: error: variable 'rocks' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
     static uint8_t rocks[9][11] PROGMEM = {
                                 ^
    bitmaps.h:232: error: variable 'ex1' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
     static uint8_t ex1 [] PROGMEM = {
                           ^
    bitmaps.h:239: error: variable 'ex2' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
     static uint8_t ex2 [] PROGMEM = {
                           ^
    bitmaps.h:246: error: variable 'ex3' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
     static uint8_t ex3 [] PROGMEM = {
                           ^
    /home/hamed/Desktop/Rocket/Rocket.ino:83:33: warning: narrowing conversion of 'random(0l, 56l)' from 'long int' to 'char' inside { } [-Wnarrowing]
       {ROCK2,   119,    random(0, 56), random(25, 75)}  ,
                                     ^
    /home/hamed/Desktop/Rocket/Rocket.ino:83:49: warning: narrowing conversion of 'random(25l, 75l)' from 'long int' to 'char' inside { } [-Wnarrowing]
       {ROCK2,   119,    random(0, 56), random(25, 75)}  ,
                                                     ^
    /home/hamed/Desktop/Rocket/Rocket.ino:84:33: warning: narrowing conversion of 'random(0l, 56l)' from 'long int' to 'char' inside { } [-Wnarrowing]
       {ROCK5,   119,    random(0, 56), random(25, 75)}  ,
                                     ^
    /home/hamed/Desktop/Rocket/Rocket.ino:84:49: warning: narrowing conversion of 'random(25l, 75l)' from 'long int' to 'char' inside { } [-Wnarrowing]
       {ROCK5,   119,    random(0, 56), random(25, 75)}  ,
                                                     ^
    /home/hamed/Desktop/Rocket/Rocket.ino:85:33: warning: narrowing conversion of 'random(0l, 56l)' from 'long int' to 'char' inside { } [-Wnarrowing]
       {ROCK8,   119,    random(0, 56), random(25, 75)}  ,
                                     ^
    /home/hamed/Desktop/Rocket/Rocket.ino:85:49: warning: narrowing conversion of 'random(25l, 75l)' from 'long int' to 'char' inside { } [-Wnarrowing]
       {ROCK8,   119,    random(0, 56), random(25, 75)}  ,
                                                     ^
    /home/hamed/Desktop/Rocket/Rocket.ino:86:33: warning: narrowing conversion of 'random(0l, 56l)' from 'long int' to 'char' inside { } [-Wnarrowing]
       {ROCK1,   119,    random(0, 56), random(25, 75)}  ,
                                     ^
    /home/hamed/Desktop/Rocket/Rocket.ino:86:49: warning: narrowing conversion of 'random(25l, 75l)' from 'long int' to 'char' inside { } [-Wnarrowing]
       {ROCK1,   119,    random(0, 56), random(25, 75)}  ,
                                                     ^                             ^
    /home/hamed/Desktop/Rocket/Rocket.ino:280:46: warning: narrowing conversion of 'random(25l, 75l)' from 'long int' to 'char' inside { } [-Wnarrowing]
       {ROCK3,   119, random(0, 56), random(25, 75)}  ,
                                                  ^
    /home/hamed/Desktop/Rocket/Rocket.ino:281:30: warning: narrowing conversion of 'random(0l, 56l)' from 'long int' to 'char' inside { } [-Wnarrowing]
       {BONUS,   119, random(0, 56), random(25, 75)}
                                  ^
    /home/hamed/Desktop/Rocket/Rocket.ino:281:46: warning: narrowing conversion of 'random(25l, 75l)' from 'long int' to 'char' inside { } [-Wnarrowing]
       {BONUS,   119, random(0, 56), random(25, 75)}
                                                  ^
    exit status 1
    variable 'player' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.
    ممنون میشم راهنمایی بفرمایین.

  2. #2
    Member
    تاریخ عضویت
    Feb 2016
    نوشته ها
    36
    منم همین مشکل رو دارم مشکل شما حل شد؟

  3. #3
    Member
    تاریخ عضویت
    May 2016
    نوشته ها
    86
    منم همین مشکل رو دارم اگه ممیشه کتابخونه تست شده این ال سی دی رو بذارید ؟؟؟

  4. #4
    Junior Member
    تاریخ عضویت
    Oct 2016
    نوشته ها
    2
    سلام
    منم روی همین پروژه دارم کار میکنم
    برای حل مشکل بالا باید کلمه Static فایل های پیوستی رو به Const تغییر بدین که از اون خطاها بگذره.
    اما مشکل من در کانفلیکت تعریف typdef bool boolean و typdef unit_8 boolean حل نشده.
    هر جور هم تغییر دادم یا پاکش کردم یا مثل هم کردم جواب نداد.
    من این پروژه رو با کتابخانه openglcd.h سایت الکترونیک - آموزش و پروژه های الکترونیک روی ماژول نانو و مگا تست کردم جواب داد.
    اینم لینکشه :
    آموزش نمایشگر گرافیکی ks0108 با arduino جلسه۱ - الکترونیک

    البته من دوست دارم که کتابخونه KS0108.h رو راه اندازی کنم. اگر از دوستان کسی راه حلی داشت ممنون میشیم که راهنمایی بفرمایند.

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •  

SEO by vBSEO