Close

Toolchain and PWM

A project log for Travelling Pi Laptop

Build a portable Pi laptop with built in breadboard space and solar charging.

ted-vartyTed Varty 08/31/2015 at 02:150 Comments

Due to, lets call it budget issues, the hardware will be acquired slowly over time. Fortunately, this gives me time to get the code up and running on the Pi prior to getting the hardware. So, I set up avr gcc on the pi. It compiles code with no issue. Haven't tested it actually flashing code because I was trying figure out wiringPi software PWM. The screen that I plan to use has a PWM input to control screen brightness, so I wanted to have a simple program to control brightness from the Pi. The code currently works. At least it can dim an LED as expected. Have not hooked it up to a scope. According to the wiringPi website, it will only operate at ~100Hz. I do not know if this is enough and wont until I can order the screen. Code is in the attached github. One thing I did notice was initializing wiringPi in the program. According to the PWM page on the website, I can use either wiringPiSetup() or wiringPiSetupGpio(). I found that, while using either one compiles, only wiringPiSetup() actually does anything. This might be operator error.

Discussions