Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Erik Kettenburg
committed
Nov 30, 2012
1 parent
871d24a
commit 3a8c8c4
Showing
284 changed files
with
39,147 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
27 changes: 27 additions & 0 deletions
27
Digispark - Windows Driver/bin/libusb-win32-bin-README.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
libusb-win32-bin v1.2.6.0 (01/17/2012) - [Package Information] | ||
|
||
ALL ARCHITECTURES: | ||
x86\libusb0_x86.dll: x86 32-bit library. Must be renamed to libusb0.dll | ||
On 64 bit, Installs to Windows\syswow64\libusb0.dll. | ||
On 32 bit, Installs to Windows\system32\libusb0.dll. | ||
|
||
x86\inf-wizard.exe: inf-wizard application with embedded libusb-win32 | ||
v1.2.6.0 binaries. | ||
|
||
X86 ONLY ARCHITECTURES: | ||
x86\libusb0.sys: x86 32-bit driver. | ||
Installs to Windows\system32\drivers\libusb0.sys | ||
|
||
AMD64-INTEL64 ONLY ARCHITECTURES: | ||
amd64\libusb0.sys: x64 64-bit driver. | ||
Installs to Windows\system32\drivers\libusb0.sys | ||
|
||
amd64\libusb0.dll: x64 64-bit library. | ||
Installs to Windows\system32\libusb0.dll | ||
|
||
IA64 ONLY ARCHITECTURES: | ||
ia64\libusb0.sys: IA64 64-bit driver. | ||
Installs to Windows\system32\drivers\libusb0.sys | ||
|
||
ia64\libusb0.dll: IA64 64-bit library. | ||
Installs to Windows\system32\libusb0.dll |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
851 changes: 851 additions & 0 deletions
851
Digispark - Windows Driver/license/libusb0/installer_license.txt
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
void setup() { | ||
// initialize the digital pin as an output. | ||
|
||
|
||
} | ||
|
||
// the loop routine runs over and over again forever: | ||
void loop() { | ||
LEDon(0, 1); | ||
delay(1000); | ||
LEDon(0, 2); | ||
delay(1000); | ||
LEDon(0, 3); | ||
delay(1000); | ||
LEDon(0, 4); | ||
delay(1000); | ||
LEDon(1, 0); | ||
delay(1000); | ||
LEDon(1, 2); | ||
delay(1000); | ||
LEDon(1, 3); | ||
delay(1000); | ||
LEDon(1, 4); | ||
delay(1000); | ||
LEDon(2, 0); | ||
delay(1000); | ||
LEDon(2, 1); | ||
delay(1000); | ||
LEDon(2, 3); | ||
delay(1000); | ||
LEDon(2, 4); | ||
delay(1000); | ||
LEDon(3, 0); | ||
delay(1000); | ||
LEDon(3, 1); | ||
delay(1000); | ||
LEDon(3, 2); | ||
delay(1000); | ||
LEDon(3, 4); | ||
delay(1000); | ||
LEDon(4, 0); | ||
delay(1000); | ||
LEDon(4, 1); | ||
delay(1000); | ||
LEDon(4, 2); | ||
delay(1000); | ||
LEDon(4, 3); | ||
delay(1000); | ||
} | ||
|
||
void LEDon(int vin, int gnd) { | ||
pinMode(0, INPUT); | ||
pinMode(1, INPUT); | ||
pinMode(2, INPUT); | ||
pinMode(3, INPUT); | ||
pinMode(4, INPUT); | ||
pinMode(5, INPUT); | ||
|
||
pinMode(vin, OUTPUT); | ||
pinMode(gnd, OUTPUT); | ||
digitalWrite(vin, HIGH); | ||
digitalWrite(gnd, LOW); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#include <TinyWireM.h> | ||
|
||
#define disk1 0x50 //Address of 24LC256 eeprom chip | ||
int returned = 0; | ||
void setup(void) | ||
{ | ||
//Serial.begin(9600); | ||
TinyWireM.begin(); | ||
|
||
unsigned int address = 0; | ||
pinMode(5, OUTPUT); | ||
|
||
writeEEPROM(disk1, address, 5); | ||
returned = readEEPROM(disk1, address); | ||
|
||
while(returned>0){ | ||
digitalWrite(5,HIGH); | ||
delay(500); | ||
digitalWrite(5,LOW); | ||
delay(500); | ||
returned--; | ||
} | ||
|
||
} | ||
|
||
void loop(){} | ||
|
||
void writeEEPROM(int deviceaddress, unsigned int eeaddress, byte data ) | ||
{ | ||
TinyWireM.beginTransmission(deviceaddress); | ||
TinyWireM.send((int)(eeaddress >> 8)); // MSB | ||
TinyWireM.send((int)(eeaddress & 0xFF)); // LSB | ||
TinyWireM.send(data); | ||
TinyWireM.endTransmission(); | ||
|
||
delay(5); | ||
} | ||
|
||
byte readEEPROM(int deviceaddress, unsigned int eeaddress ) | ||
{ | ||
byte rdata = 0xFF; | ||
|
||
TinyWireM.beginTransmission(deviceaddress); | ||
TinyWireM.send((int)(eeaddress >> 8)); // MSB | ||
TinyWireM.send((int)(eeaddress & 0xFF)); // LSB | ||
TinyWireM.endTransmission(); | ||
|
||
TinyWireM.requestFrom(deviceaddress,1); | ||
|
||
if (TinyWireM.available()) rdata = TinyWireM.receive(); | ||
|
||
return rdata; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include <TinyWireM.h> | ||
#define expander 0x20 | ||
|
||
byte expanderStatus = B11111111; //all off | ||
|
||
void setup() | ||
{ | ||
TinyWireM.begin(); | ||
} | ||
|
||
void loop() | ||
{ | ||
expanderWrite(0,HIGH); | ||
delay(1000); | ||
expanderWrite(0,LOW); | ||
delay(1000); | ||
} | ||
|
||
|
||
void expanderWrite(byte pinNumber, boolean state){ | ||
if(state == HIGH) | ||
expanderStatus &= ~(1 << pinNumber); | ||
else | ||
expanderStatus |= (1 << pinNumber); | ||
|
||
expanderWrite(expanderStatus); | ||
} | ||
|
||
void expanderWrite(byte _data ) { | ||
TinyWireM.beginTransmission(expander); | ||
TinyWireM.send(_data); | ||
TinyWireM.endTransmission(); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
int irPin=2; | ||
|
||
void setup() | ||
{ | ||
pinMode(irPin,INPUT); | ||
pinMode(0,OUTPUT); | ||
//Serial.begin(9600); | ||
digitalWrite(0,HIGH); | ||
//Serial.println("You pressed a button"); | ||
delay(1000); | ||
digitalWrite(0,LOW); | ||
} | ||
|
||
void loop() | ||
{ | ||
|
||
if(pulseIn(irPin,LOW)) | ||
{ | ||
//button pressed | ||
delay(100); | ||
digitalWrite(0,HIGH); | ||
//Serial.println("You pressed a button"); | ||
delay(1000); | ||
digitalWrite(0,LOW); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
This example code is in the public domain. | ||
*/ | ||
|
||
int MotorADir = 2; | ||
int MotorASpeed = 0; | ||
int MotorBDir = 5; | ||
int MotorBSpeed = 1; | ||
|
||
// the setup routine runs once when you press reset: | ||
void setup() { | ||
// initialize the outputs. | ||
pinMode(led, OUTPUT); | ||
pinMode(led, OUTPUT); | ||
pinMode(led, OUTPUT); | ||
pinMode(led, OUTPUT); | ||
} | ||
|
||
// the loop routine runs over and over again forever: | ||
void loop() { | ||
//both motors forward full speed | ||
digitalWrite(MotorADir, HIGH); //forward | ||
digitalWrite(MotorBDir, HIGH); | ||
analogWrite(MotorASpeed, 255); //full speed | ||
analogWrite(MotorBSpeed, 255); | ||
delay(5000); // wait for 5 seconds | ||
//turn in place (if using a skid steer configuration) | ||
digitalWrite(MotorADir, HIGH); //forward | ||
digitalWrite(MotorBDir, HIGH); | ||
analogWrite(MotorASpeed, 255); | ||
analogWrite(MotorBSpeed, 0); //off | ||
delay(5000); // wait for 5 seconds | ||
//turn gradually - the other direction (if using a skid steer configuration) | ||
digitalWrite(MotorADir, HIGH); //forward | ||
digitalWrite(MotorBDir, HIGH); | ||
analogWrite(MotorASpeed, 100); | ||
analogWrite(MotorBSpeed, 255); | ||
delay(5000); // wait for 5 seconds | ||
//stop | ||
digitalWrite(MotorADir, HIGH); //forward | ||
digitalWrite(MotorBDir, HIGH); | ||
analogWrite(MotorASpeed, 0); | ||
analogWrite(MotorBSpeed, 0); //off | ||
//reverse slowly | ||
digitalWrite(MotorADir, LOW); //reverse | ||
digitalWrite(MotorBDir, LOW); | ||
analogWrite(MotorASpeed, 100); | ||
analogWrite(MotorBSpeed, 100); | ||
} |
Oops, something went wrong.