Support Windows 10 ONLY.
necessaryEvil from nowOn
2018-04-17
2018-04-11
2018-03-09
2018-02-25
Win7, VirtualBox - Resize hdd to bigger (20GB to 40GB).
Step-01: Extend to 40GB as example
# VBoxManager.exe modifyhd filePath:/virtual-HDD-filename.vdi --resize 40000
# VBoxManager.exe modifyhd filePath:/virtual-HDD-filename.vdi --resize 40000
2018-01-29
2017-10-31
TCL, array 陣列
Example Code
Check ARRAY exist (1: true - 0: false)
List ARRAY variable name
Get ARRAY variable content
Resurt
array set familyName {
papa Agent7
momo Agent8
son Agent9
}
Check ARRAY exist (1: true - 0: false)
# array exists family
# 1
List ARRAY variable name
# array name family
# sonName momoName papaName
Get ARRAY variable content
# array get family
# sonName Agent9 momoName Agent8 papaName Agent7
Resurt
# puts $familyName(papa)
# AgentPAPA
# puts $familyName(momo)
# AgentMOMO
2017-10-11
2017-07-19
2017-06-05
Arduino, Vibration Sensor SW420
Example Code
int pin_LED = 13;
int pin_EP = 9;
void setup() {
Serial.begin(9600);
pinMode (pin_LED, OUTPUT);
pinMode (pin_EP, INPUT); //set EP input for measurment
}
void loop() {
long measurement = TP_init(); //Vibration sensor.
delay(50); // default is 50
Serial.print( "key U:" ); Serial.print( " [" ); Serial.print( measurement ); Serial.print( "] " );
if (measurement > 500){
digitalWrite(pin_LED, HIGH);
Serial.print( "Vibration Level: Earthquake." );
} else if (measurement > 100){
digitalWrite(pin_LED, HIGH);
Serial.print( "Vibration Level: Shake Tea." );
digitalWrite(pin_LED, LOW);
} else {
digitalWrite(pin_LED, LOW);
Serial.print( "Vibration Level: Very Quiet." );
}
}
long TP_init(){
delay(10); // default is 10
long measurement=pulseIn (pin_EP, HIGH); //wait for the pin to get HIGH and returns measurement
return measurement;
}
2017-01-11
Android, ADB push & pull file.
PUSH / PC to Android
Copy file from PC to Android through ADB shell.
Syntax | PC C:\ADB\adb push source_PC_filePath destination_Android_ filePath
example: adb push w200b\02-video\color2-green.mp4 data/worktmp
PULL / Android to PC
Copy file from Android to PC through ADB shell.
Syntax | PC C:\ADB\adb pull source_Android_filePath destination_PC_filePath
example: adb pull data/worktmp/SoundRecord.png w200b
Copy file from PC to Android through ADB shell.
Syntax | PC C:\ADB\adb push source_PC_filePath destination_Android_ filePath
example: adb push w200b\02-video\color2-green.mp4 data/worktmp
PULL / Android to PC
Copy file from Android to PC through ADB shell.
Syntax | PC C:\ADB\adb pull source_Android_filePath destination_PC_filePath
example: adb pull data/worktmp/SoundRecord.png w200b
訂閱:
文章 (Atom)