0

I use bcm2835's mcp3008 sample program to export to .so Then use ctypes to draw .so in python But in the process of compiling python, the following error is thrown

bcm2835_spi_begin failed. Are you running as root??

How can I solve this problem please?

1 Answer 1

0

The function bcm2835_spi_begin requires root privileges to run.

You have two choices.

  1. don't use bcm2835_spi_begin
  2. run the program with root privileges
3
  • Is there any way to enter root without using command-line interface? In the case of compiling with IDE, directly maintain the state of root? May 22 at 14:42
  • You need to edit your question and show the commands you are running.
    – joan
    May 22 at 15:07
  • @user19104274 Is there any way to enter root without using command-line interface? ... please post that in a new question at unix.stackexchange.com/questions ... it is unrelated to your posted question ... it should not be answered here
    – jsotola
    May 23 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.