This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Example based on code found here. | |
* https://github.com/iwanders/OBD9141 | |
* | |
* Put the "OBD9141 in Libraries folder. | |
* | |
*/ | |
#include "OBD9141.h" | |
#include "SamNonDuePin.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "SamNonDuePin.h" | |
const int LPC = PIN_EMAC_ERX0; // LOW POWER CONTROL pin | |
const int PWM_nVPW = PIN_EMAC_EMDC; // PWM/VPW level control | |
void setup() { | |
pinModeNonDue(LPC, OUTPUT); | |
pinModeNonDue(PWM_nVPW, OUTPUT); | |
digitalWriteNonDue(LPC, HIGH); // LOW = no power at +12V_SW/+5V_SW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "SamNonDuePin.h" | |
const int LPC = PIN_EMAC_ERX0; // LOW POWER CONTROL pin | |
void setup() { | |
pinModeNonDue(LPC, OUTPUT); | |
digitalWriteNonDue(LPC, LOW); // LOW = no power at +12V_SW/+5V_SW | |
// HIGH = power at +12V_SW/+5V_SW | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Fade | |
Modified 6/6/16 to demonstrate Macchina 2.0 RGB LEDs, | |
also functioning as a HELLO WORLD type sketch. | |
This example shows how to fade an LED on the RGB LED | |
using the analogWrite() function. | |
The analogWrite() function uses PWM, so if |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define MASTER_CLOCK 84000000 | |
#include "SamNonDuePin.h" | |
uint32_t clock_a = 42000000; // Sampling frequency in Hz | |
int brightness = 0; // how bright the LED is | |
int fadeAmount = 5; // how many points to fade the LED by | |
const int IOENABLE = 6; // the number of the 12Vio_EN pin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################## | |
macchina.name=Macchina | |
macchina.vid.0=0x2341 | |
macchina.pid.0=0x003f | |
macchina.vid.1=0x2341 | |
macchina.pid.1=0x0044 | |
macchina.upload.tool=avrdude |
NewerOlder