Raspberry Pi lesson help

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
jneuman88
 
Posts: 3
Joined: Thu Feb 12, 2015 9:33 am

Raspberry Pi lesson help

Post by jneuman88 »

We are running through your lessons on the raspberry pi. Does most recent version of noobs already contain all the pwm and servo kernel modules necessary to run the raspberry pi tutorials from lesson 8 and on as they are written?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi lesson help

Post by adafruit_support_mike »

Yes, newer versions of the RasPi OS have all those modules built in.

You can also try our new Pi Finder program to automatically load all the pieces we use here at Adafruit:

https://github.com/adafruit/Adafruit-Pi ... 2.0.0-beta

User avatar
jneuman88
 
Posts: 3
Joined: Thu Feb 12, 2015 9:33 am

Re: Raspberry Pi lesson help

Post by jneuman88 »

The code in Lesson 8 calls for "/sys/class/rpi-pwm/pwm0/ ". I dont see that directory in the current version of NOOBs. Is it called something else now or maybe hidden in another directory?

Thanks

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi lesson help

Post by adafruit_support_mike »

That's one of the low-level changes in recent versions of Raspbian. Tutorial #8 is on our list for updating.

This page has a good description of the new PWM features in the RPi.GPIO package:
http://raspi.tv/2013/rpi-gpio-0-5-2a-no ... -to-use-it

User avatar
jneuman88
 
Posts: 3
Joined: Thu Feb 12, 2015 9:33 am

Re: Raspberry Pi lesson help

Post by jneuman88 »

Read the article on the pwm in RPi.GIO ... thank you. Very informative, though the note at the bottoms says it doesn't control servos well and that there'd be more in the next article. But part 2 also just says it doesn't work well for servos and no more on that topic: http://raspi.tv/2013/how-to-use-soft-pw ... ed-control

So we're still a bit stuck on lesson 8. The code in Lesson 8 calls out this directory file: "/sys/class/rpi-pwm/pwm0/" This does not exist in my version of Raspian. We tried to add it to Raspian by downloading Occidentalis v0.2 following the instructions here: https://learn.adafruit.com/adafruit-ras ... s-v0-dot-2

We also use the Pi Finder you mentioned above, but we still don't see it in that directory. If it is adding it, it's not going to the /sys/ directory and we can't find it in any of the other directories.

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi lesson help

Post by adafruit_support_mike »

The RPi.GPIO version works well enough for general experimentation.

It does have some jitter, which highlights a basic problem in using the RasPi for things that require precise timing. Linux is what's called a 'time slicing' operating system, which means the OS gives each program a certain amount of CPU time, then suspends it and gives the next program a turn. That works for programs that don't care about timing, and programs that interact with humans because we move much slower than the operating system does. It doesn't work so well with signals that need millisecond or microsecond precision, and making Linux work at that level is a hard problem to solve.

The most common solution is to hand the timing-critical work off to another chip like our 16-channel servo driver: https://www.adafruit.com/products/2327

Give the RPi.GPIO version a try though.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”