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 <Arduino.h> | |
void checkInput(); | |
const int pinAdc1 = A0; | |
const int pinAdc2 = A1; | |
const int treshold = 1200; | |
unsigned long lastSound = 0; |
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
### Keybase proof | |
I hereby claim: | |
* I am jngrt on github. | |
* I am jangeert (https://keybase.io/jangeert) on keybase. | |
* I have a public key ASBO_mYVrq3fEm5kvc_Qb041zrPUTXF4gNkMnOV-wQNdfQo | |
To claim this, I am signing this object: |
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
function hi(){ | |
return "hi"; | |
} |
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
var df:DateTimeFormatter = new DateTimeFormatter(LocaleID.DEFAULT); | |
df.setDateTimePattern("yyyyMMdd");//format for filename | |
var fs:FileStream = new FileStream(new File(File.applicationDirectory.resolvePath('log').resolvePath(df.format(new Date())+".log").nativePath)); | |
df.setDateTimePattern("HH:mm:ss:");//format for log messages (can't include millisec?? http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/globalization/DateTimeFormatter.html) | |
try{ | |
fs.openAsync(f, FileMode.APPEND); | |
}catch(e:IOError){ | |
trace("Log file could not be opened"); | |
} |
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
stage.nativeWindow.addEventListener(Event.CLOSING, function(e:Event):void{ | |
//Cleanup, ask for save etc | |
}); |
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
loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, function( evt : UncaughtErrorEvent ):void{ | |
evt.preventDefault(); | |
var message:String; | |
if (event.error is Error) message = Error(event.error).message; | |
else if (event.error is ErrorEvent) message = ErrorEvent(event.error).text; | |
else message = event.error.toString(); | |
trace("Uncaught error: "+message); |