Any terms used are not an attempt to sound smart but to :-sound smart by using hardware terms and such
The big problem with this is how you control the 555. This takes an analogue signal so you would either need a digital to analogue converter called an D/A or a device known as a digital pot which you control over an interface called SPI ( Serial Protocol Interface ).I was reading on some places about using the go to fix for every hardware guy it seems "O just use a 555 to do the PWM for you".
mahjongg wrote:"sudo code?" whats that?
sudo is a command you can put in front of any command line command, it has nothing to do with programming, and if you simply want a prefabricated piece of "code" to execute (with or without sudo), then I'm sorry it doesn't exist.
If you need just a single PWM then use the single PWM GPIO output.
Creating a PWM output (in any programming language, even assembler) on a Linux system isn't really possible, as Linux does many tasks at the same time, so your "PWM program", that doesn't do anything but regularly toggle a GPIO port, may not get the CPU's attention for an undeterminable time, so creating any signal with a determinable interval isn't possible on a system like linux, you will need extra hardware to do the timing, that is you need PWM (timer) hardware.
A microcontroller like the Arduino is much simpler, and you can just "count instructions" to create determinable timing.
Facttech_monkey wrote:Pseudocode is a kind of structured English for describing algorithms. It allows the designer to focus on the logic of the algorithm without being distracted by details of language syntax. At the same time, the pseudocode needs to be complete. It describes the entire logic of the algorithm so that implementing it becomes a simple task of translating line by line into source code.
I was taught Pseudocode when learning how to program in assembler on a 6502 machine (yes the same as on the good old beeb and others) but this computer had a keypad and some 7 segment displays and some red LEDs you could turn on or off.
There is an actual standard for Pseudocode.
Any one who has written program in C, VB, BBC basic and Pascal will find it fairly easy to convert a Pseudocode program to the relevant language.
Not really no as it only uses the single built-in PWM output on the Pi, tho OP needs 3.tech_monkey wrote:Would the Gert board be useful as there is a video demo somewhere on the PI website with it running a stepper motor and I guess thats using PWM.
Couldn't you multiplex it, or would that produce too much flicker.domesday wrote:Not really no as it only uses the single built-in PWM output on the Pi, tho OP needs 3.tech_monkey wrote:Would the Gert board be useful as there is a video demo somewhere on the PI website with it running a stepper motor and I guess thats using PWM.
Thanks man! At least one person is not kicking ye down unders in here. It kinda sucks since I bought 2 of these things. What I would need to do is have some way the Arduino to talk to the PI. Now that would be nice. Or 1 Arduino for multi PI'sChewy wrote:I empathise with Phara0h since I went through exactly the same loop whilst researching the control of motors from a pi (or whatever he wants to drive with PWM) and for me the answer was *cough* Arduino - The pi I will use for cameras or perhaps navigation or anything that is far less real time dependent.
I'm sure all of the interfacing to additional ICs is possible but I concluded it wasn't the easiest way to achieve the objective.
Well how about the A6281 chip. That has 3 PWM outputs and is designed for driving an RGB LED.Phara0h wrote:I only really need to drive one RGB led, so having a chip like TLC5940 would be complete over kill.
Grumpy Mike wrote:Well how about the A6281 chip. That has 3 PWM outputs and is designed for driving an RGB LED.Phara0h wrote:I only really need to drive one RGB led, so having a chip like TLC5940 would be complete over kill.
It is the chip at the center of the Shift Bright product.