| 173 | |
| 174 | '''Receiving''' |
| 175 | |
| 176 | Register the class that implements the CharReceiver protocol to the FSKRecognizer class. |
| 177 | |
| 178 | {{{ |
| 179 | #!C |
| 180 | @ Interface MainViewController: UIViewController <CharReceiver> |
| 181 | }}} |
| 182 | |
| 183 | Register FSKRecognizer class at initialization. |
| 184 | |
| 185 | {{{ |
| 186 | #!C |
| 187 | MainViewController * mainViewController; |
| 188 | [Recognizer addReceiver: mainViewController]; |
| 189 | }}} |
| 190 | |
| 191 | receivedChar: method is called when one byte of data is received. |
| 192 | |
| 193 | {{{ |
| 194 | #!C |
| 195 | - (Void) receivedChar: (char) input |
| 196 | { |
| 197 | // Receive handling |
| 198 | } |
| 199 | }}} |
| 200 | |
| 201 | '''Sending''' |
| 202 | |
| 203 | Sending data is much easier than receiving data. FSKSerialGenerator class's writeByte: method to sends a single byte. |
| 204 | |
| 205 | {{{ |
| 206 | #!C |
| 207 | [Generator writeByte: 0xff]; |
| 208 | }}} |
| 209 | |
| 210 | == Document == |
| 211 | |
| 212 | * [http://www.flickr.com/photos/arms22/4821347734 Schematic][[BR]] |
| 213 | * [http://code.google.com/p/arms22/downloads/detail?name=iPhoneSoftModem%20BreakOut_EAGLE_v1.zip Eagle Files] |
| 214 | |
| 215 | == More Infomations == |
| 216 | |
| 217 | * [http://arms22.blog91.fc2.com/?tag=SoftModem I'll Make anything, maybe. SoftModem] |
| 218 | * [http://sites.google.com/a/reinforce-lab.com/www/projects/iphone-software-modem Reinforce Lab - iPhone SoftwareModem] |