SoftModem
所属分类:Modem编程
开发工具:C++
文件大小:0KB
下载次数:0
上传日期:2016-09-02 05:26:20
上 传 者:
sh-1993
说明: Arduino的音频插孔调制解调器库,
(Audio Jack Modem Library for Arduino,)
文件列表:
LICENSE (1476, 2016-08-18)
SoftModem.cpp (7622, 2016-08-18)
SoftModem.h (1719, 2016-08-18)
examples/ (0, 2016-08-18)
examples/SerialBridge/ (0, 2016-08-18)
examples/SerialBridge/SerialBridge.ino (488, 2016-08-18)
extras/ (0, 2016-08-18)
extras/schematic.png (61710, 2016-08-18)
extras/softmodem.jpg (155149, 2016-08-18)
keywords.txt (640, 2016-08-18)
library.properties (308, 2016-08-18)
![SoftModem](https://github.com/arms22/SoftModem/blob/master/extras/softmodem.jpg)
SoftModem
====
SoftModem is a wired, low-cost and platform independent solution for communication between an Arduino and mobile phones. It uses the phone's audio jack and Bell 202 modem-like FSK encoding with up to 1225 bit/s. Check out this [blog post](https://github.com/arms22/SoftModem/blob/master/http://translate.google.com/translate?js=y&prev=_t&hl=en&ie=UTF-8&layout=1&eotf=1&u=http%3A%2F%2Farms22.blog91.fc2.com%2Fblog-entry-350.html&sl=auto&tl=en).
Projects based on SoftModem:
- [SoftModemTerminal](https://github.com/arms22/SoftModem/blob/master/https://github.com/arms22/arms22/tree/master/SoftModemTerminal) by Arms22: an iOS SoftModem terminal application
- [FSK-Serial-Generator](https://github.com/arms22/SoftModem/blob/master/https://github.com/NeoCat/FSK-Serial-Generator-in-JavaScript) by NeoCat: a JavaScript transmitter implementation
- [WebJack](https://github.com/arms22/SoftModem/blob/master/https://github.com/publiclab/webjack) by PublicLab: a JavaScript transmitter and receiver, compatible with [Firmata.js](https://github.com/arms22/SoftModem/blob/master/https://github.com/firmata/firmata.js/)/[Jonny-Five](https://github.com/arms22/SoftModem/blob/master/http://johnny-five.io/)
### Install via Arduino Library Manager
Open the Arduino Library Manager from the menu: `Sketch → Include Library → Manage Libraries...`.
Then search for 'SoftModem' and click install.
### Manual install
Create a folder 'SoftModem' inside your `libraries` folder and place these files there.
## Supported Boards
- ATmega328: Arduino Uno / Nano / Pro / Pro Mini / Fio
- ATtiny85, ATmega32U4: not implemented yet, contributions welcome!
| Board | TX pin | RX pin | AIN1 pin | Timer | Notes |
|:----------------:|:------:|:------:|:--------:|:-----:|:-----:|
| Arduino Uno | 3 | 6 | 7 | 2 | |
| | | | | | |
## Usage
This is an example sketch that forwards data to/from the serial port.
```Arduino
#include
SoftModem modem = SoftModem();
void setup() {
Serial.begin(115200);
Serial.println("Booting");
delay(100);
modem.begin();
}
void loop() {
while(modem.available()){
int c = modem.read();
if(isprint(c)){
Serial.print((char)c);
}
else{
Serial.print("(");
Serial.print(c,HEX);
Serial.println(")");
}
}
if(Serial.available()){
modem.write(0xff);
while(Serial.available()){
char c = Serial.read();
modem.write(c);
}
}
}
```
### Notes
SoftModem uses Timer2, therefore you can not make use of the `analogWrite()` function for pins 3 and 11 in your sketch.
### Hardware
A shield is available [here](https://github.com/arms22/SoftModem/blob/master/https://www.switch-science.com/catalog/600/) or [here](https://github.com/arms22/SoftModem/blob/master/http://www.elechouse.com/elechouse/index.php?main_page=product_info&cPath=90_92&products_id=2199). You can also build your own. Here is the schematic:
![Schematic](https://github.com/arms22/SoftModem/blob/master/extras/schematic.png)
##License
[BSD 3](https://github.com/arms22/SoftModem/blob/master/https://github.com/arms22/SoftModem/blob/master/LICENSE)
近期下载者:
相关文件:
收藏者: