Hello Forum,
I am translating a Uno script into one that will work on a Yun.
On the Uno, I can change various pin parameters like this:
// Set pins as outputs
DDRD = DDRD | B11111100; // this is safer as it sets pins 2 to 7 as outputs
DDRB = DDRB | B00111111; // this is safer as it sets pins 8 to 13 as outputs
// Pins 5 and 6 Default is 0x03 = 976.6 Hz
TCCR0B = TCCR0B & 0b111111000 | 0x03; // Try 0x01 for 62500 Hz; 0x02 = 7812.5 Hz or 0x03 for 976.6 Hz
// Pins 9 and 10 default is 0x03 = 488 Hz
TCCR2B = TCCR2B & 0b111111000 | 0x03; // Try 0x01 for 31250 Hz; 0x02 = 3906.3 Hz or Ox03 for 488.28 Hz
The command starting TCCR2B does not compile and gives me the following...
Arduino: 1.5.4 (Mac OS X), Board: "Arduino Yún"
YUN_Igor_Sockit2.ino: In function 'void setup()':
YUN_Igor_Sockit2:49: error: 'TCCR2B' was not declared in this scope
This code compiles for the Uno. I suppose that I have to make this command via the Bridge with the Yun so can anyone tell me how I can do this?
Thanks,
Nick