<commit_before>ArduinoFirmata-Android
======================
Arduino Firmata protocol (http://firmata.org) implementation on Android(Java)


REQUIREMENTS:
-------------
* Arduino Standard Firmata v2.2
Arduino IDE -> [File] -> [Examples] -> [Firmata] -> [StandardFirmata]

* Android SDK 13+ (Android OS 3.2+)
* [usb-serial-for-android](http://code.google.com/p/usb-serial-for-android)
* [USB Host Cable](https://www.google.com/search?q=USB+host+cable)


SYNOPSIS:
---------

1. Download (https://github.com/shokai/ArduinoFirmata-Android/raw/master/arduino-firmata.jar)[arduino-firmata.jar]
2. Download [usb-serial-for-android](http://code.google.com/p/usb-serial-for-android)
3. Put into "libs" directory
<img src="http://shokai.org/archive/file/1ccdad0b5a0d705124e8fb0cdd5a98c0.png">


### Connect

```java
import org.shokai.firmata.ArduinoFirmata;

ArduinoFirmata arduino = new ArduinoFirmata();
try{
  arduino.start();
}
catch(IOException e){
  e.printStackTrace();
}
```


### Digital Write
```java
arduino.digitalWrite(13, true);
arduino.digitalWrite(13, false);
```

### Digital Read
```java
arduino.pinMode(7, ArduinoFirmata.INPUT);
arduino.digitalRead(7);  // => true/false
```

### Analog Write (PWM)
```java
arduino.analogWrite(11, 230);
```

### Analog Read
```java
arduino.analogRead(0);  // => 0 ~ 1023
```

Close
```java
arduino.close();
```

Set Event Handler
```java<commit_msg>fix README<commit_after>ArduinoFirmata-Android
======================
Arduino Firmata protocol (http://firmata.org) implementation on Android(Java)


REQUIREMENTS:
-------------
* Arduino Standard Firmata v2.2

Arduino IDE -> [File] -> [Examples] -> [Firmata] -> [StandardFirmata]

* Android SDK 13+ (Android OS 3.2+)
* [usb-serial-for-android](http://code.google.com/p/usb-serial-for-android)
* [USB Host Cable](https://www.google.com/search?q=USB+host+cable)


SYNOPSIS:
---------

1. Download [arduino-firmata.jar](https://github.com/shokai/ArduinoFirmata-Android/raw/master/arduino-firmata.jar)
2. Download [usb-serial-for-android](http://code.google.com/p/usb-serial-for-android)
3. Put into "libs" directory

<img src="http://shokai.org/archive/file/1ccdad0b5a0d705124e8fb0cdd5a98c0.png">


### Connect

```java
import org.shokai.firmata.ArduinoFirmata;

ArduinoFirmata arduino = new ArduinoFirmata();
try{
  arduino.start();
}
catch(IOException e){
  e.printStackTrace();
}
```


### Digital Write
```java
arduino.digitalWrite(13, true); // on board LED
arduino.digitalWrite(13, false);
```

### Digital Read
```java
arduino.pinMode(7, ArduinoFirmata.INPUT);
arduino.digitalRead(7);  // => true/false
```

### Analog Write (PWM)
```java
arduino.analogWrite(11, 230); // pinNumber, value(0~255)
```

### Analog Read
```java
arduino.analogRead(0);  // => 0 ~ 1023
```

Close
```java
arduino.close();
```

Set Event Handler
```java
{'fraction_non_alphanumeric': 0.2072135785007072, 'fraction_numerical': 0.031117397454031116, 'mean_word_length': 4.6467065868263475, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1905474', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1048, 'n_words': 183}