Comments: Programming the pcDuino
Looking for answers to technical questions?
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
If you've found an issue with this tutorial content, please send us your feedback!
I try to test python code to PCduino V2 with MAX7219. To let 4-digit 7 segment present a counter number using SPI communication.
I connect wire from MAX7219 to PCduino:
cs to pin 10(digital I/O) clk to pin 13(clk) Din to pin 11(MOSI)
This below is a source code.
import spi import time import gpio
cspin = "gpio10"
def maxsend(address, value): gpio.digitalWrite(cspin, gpio.LOW) spi.transfer(address) spi.transfer(value) gpio.digitalWrite(cspin, gpio.HIGH)
def setup(): gpio.pinMode("gpio13", gpio.OUTPUT) gpio.pinMode("gpio11", gpio.OUTPUT) gpio.pinMode(cspin, gpio.OUTPUT) gpio.digitalWrite(cspin, gpio.HIGH) spi.openSPI(speed=1000000, mode=0) time.sleep(0.01) maxsend(0x0B, 0x06) maxsend(0x09, 0xFF) maxsend(0x0A, 0xFF) maxsend(0x0C, 0x01) maxsend(0x0A, 0x0F)
def loop(): for i in range(0,2000): maxsend(0x04,i%10) maxsend(0x03,(i/10)%10) maxsend(0x02,(i/100)%10) maxsend(0x01,(i/1000)%10) time.sleep(0.5)
setup() loop()
When I run it, nothing happen on 7 segment But it has a message show on terminal:
Device Tree Overlays, does pcDuino require/use them? Or has that been taken care of in the image and the auto load of an appropriate DTO on boot?
I have the same problem... I need an answer it is really hurry for me!! ... amm.. i just get this ... .
fd = open(file, ‘r’) IOError: [Errno 2] No such file or directory: ‘/sys/class/leds/pwm0/max_brightness
Please HELP!!
Good day! I'm trying to use the nrf24l01p with pcduino, but i don't found a library for this, who can help me? I will be grateful
When I try to save the HelloWorld file, I get an error "Can't open file to write". This happens even when just trying to create a folder. Any ideas?
I can't seem to get the serial (/dev/ttyS1) to work on my pcduino. My goal is to connect it to a sabertooth motor controller.
I would think I should be able to connect the RX/TX pins and then screen /dev/ttyS1 9600 and be able to type and see what I type, but I can't.
I also ran the python script included in the Serial Communication section and I just get "You typed " and return to prompt.
I suspect its because I need to set the pin to mode 3, but I wasn't clear on how to do that from the tutorial. Is there a way to do this from the command line?
I copied all scripts from Github , GPIO worked correctly. But analog.py didn't worked.
It returned "No such file or directory: ‘/sys/class/leds/pwm0/max_brightness’"
ls -la /sys/class/leds/ returns nothing , folder empty.
Is there any other things needs to be installed ?
I encountered the same problem..... neigher C++ nor Python works.....
I just read the entire article - doh - and I noticed the link to the github repo. Check it out. Once I cloned the repo everything built and ran fine.
i have cloned this repo https://github.com/sparkfun/pcDuino using latest images and kernel from pcduino.com but doesn't have anything in sys/class/leds
Exactly the same here!
I have entered simple analog input and output program, and i been keep facing error saying:
Traceback (most recent call last): File "analog.py", line 43, in fd = open(file, 'r') IOError: [Errno 2] No such file or directory: '/sys/class/leds/pwm0/max_brightness'
code is python code(https://learn.sparkfun.com/tutorials/programming-the-pcduino/analog-input-and-output)
What am I doing wrong?
OS info: Linaro 12.07 (GNU/LINUX 3.4.29+ arm71)