element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum RPi 3 B+ with Sense Hat getting "Error: cannot open framebuffer device." from snake.c example
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 16 replies
  • Subscribers 665 subscribers
  • Views 4278 views
  • Users 0 members are here
  • sense hat
  • frame_buffer
  • raspberry_pi_3b+
Related

RPi 3 B+ with Sense Hat getting "Error: cannot open framebuffer device." from snake.c example

osenjw
osenjw over 5 years ago

I am new to RPi.

 

I placed the sense hat on an RPi 3B+ and get a nice rainbow display on the LED.

 

When I run the snake example, I get the message "Error: cannot open framebuffer device."

 

I run in debug using Code::Blocks, and I see that the code apparently finds the joystick.  So the frame buffer is not the first thing I checked.

 

My RPi is nearly virgin.  I have installed Code::Blocks and the sense hat.  Raspian is up to date.  I enabled VNC, SSN, SPI and I2C.

 

I am working headless via a VNC window in W10.

 

Is there an incompatibility between a RPi 3B+ and the sense hat?  I am seeing that it is compatible with RPi 3B  (no +).

 

If not, would somebody offer a suggestion for getting snake to get past this error?

 

Thanks.

  • Sign in to reply
  • Cancel
Parents
  • shabaz
    shabaz over 5 years ago

    Hi John,

     

    Just to confirm, the Sense HAT was placed on the Pi unpowered, right? I doubt the framebuffer appears except at boot time.

    Since i2cdetect seems to be providing the correct type of info, it is likely that the Sense HAT works (but as mentioned, the framebuffer may not appear without a reboot).

    There could be a software issue too - perhaps it is looking for a particular enumeration, and using VNC may be confusing it.

    You could try the following combinations:

    1. Using a HDMI monitor and the Sense HAT

    2. Using the Sense HAT but no HDMI monitor, and no VNC either (i.e. just using SSH).

    The Pi is just a Linux computer - there should be some training material on the Pi website which may make some assumptions (e.g. locally attached HDMI monitor)

    If you're going to create your own procedures, then you have to test it out thoroughly beforehand - the same applies with any STM discovery board too I imagine.

     

    By the way, if this is for students to learn embedded programming, you may need to have someone experienced in troubleshooting nearby, because the engineering-minded/curious students will likely do stuff on their own enterprise, so you'll need to be prepared for that, if they get stuck - that's just the way engineering-minded students are.

     

    EDIT: Reading some more of the posts above, it seems you have rebooted and tried a HDMI monitor. Just to confirm, you're using the 'official' PSU, right? The sense HAT may consume a fair amount of power for the LEDs.

    I have a Sense HAT somewhere so I will try to replicate it if I can find it..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • shabaz
    shabaz over 5 years ago

    Hi John,

     

    Just to confirm, the Sense HAT was placed on the Pi unpowered, right? I doubt the framebuffer appears except at boot time.

    Since i2cdetect seems to be providing the correct type of info, it is likely that the Sense HAT works (but as mentioned, the framebuffer may not appear without a reboot).

    There could be a software issue too - perhaps it is looking for a particular enumeration, and using VNC may be confusing it.

    You could try the following combinations:

    1. Using a HDMI monitor and the Sense HAT

    2. Using the Sense HAT but no HDMI monitor, and no VNC either (i.e. just using SSH).

    The Pi is just a Linux computer - there should be some training material on the Pi website which may make some assumptions (e.g. locally attached HDMI monitor)

    If you're going to create your own procedures, then you have to test it out thoroughly beforehand - the same applies with any STM discovery board too I imagine.

     

    By the way, if this is for students to learn embedded programming, you may need to have someone experienced in troubleshooting nearby, because the engineering-minded/curious students will likely do stuff on their own enterprise, so you'll need to be prepared for that, if they get stuck - that's just the way engineering-minded students are.

     

    EDIT: Reading some more of the posts above, it seems you have rebooted and tried a HDMI monitor. Just to confirm, you're using the 'official' PSU, right? The sense HAT may consume a fair amount of power for the LEDs.

    I have a Sense HAT somewhere so I will try to replicate it if I can find it..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube