Skip to content

Commit

Permalink
v0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
turbyho committed Mar 20, 2017
1 parent e7dc1da commit cf33b1e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 19 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ Open library manager in Arduino IDE and install the DABDUINO library.

## References
For command reference visit [DABDUINO.cpp](https://github.com/turbyho/DABDUINO/blob/master/src/DABDUINO.cpp).
Example is here [DABDUINO_example_1.ino](https://github.com/turbyho/DABDUINO/blob/master/examples/Dabduino_example_1/DABDUINO_example_1.ino).

## Where buy the DABDUINO?
I waiting for first batch of DABDUINO boards. First boards will be ready for dispatch on 05/2017. Send me preorders please.

## Final DABDUINO

<img src="doc/IMG_6741.jpg">

<img src="doc/IMG_6728.jpg">

<img src="doc/dabduino_01.jpg">
<img src="doc/dabduino_02.jpg">

### Second prototype video
[<img src="https://img.youtube.com/vi/LBgsKTtB7Bs/0.jpg">](https://www.youtube.com/watch?v=LBgsKTtB7Bs)
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
14 changes: 7 additions & 7 deletions examples/Dabduino_example_1/DABDUINO_example_1.ino
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,24 @@ void setup() {
dab.playStatus(status);
if (status != lastStatus) {
Serial.println();
// 1=playing, 2=searching, 3=tuning, 4=stop, 5=sorting change, 6=reconfiguration
// 0=playing, 1=searching, 2=tuning, 3=stop, 4=sorting change, 5=reconfiguration
switch (status) {
case 1:
case 0:
Serial.print("Playing");
break;
case 2:
case 1:
Serial.print("Searching");
break;
case 3:
case 2:
Serial.print("Tuning");
break;
case 4:
case 3:
Serial.print("Stop");
break;
case 5:
case 4:
Serial.print("Sorting");
break;
case 6:
case 5:
Serial.print("Reconfiguration");
break;
}
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=DABDUINO
version=0.1.3
version=0.1.4
author=Tomas Urbanek
maintainer=Tomas Urbanek
sentence=Library for controlling DABDUINO - DAB/DAB+ (digital radio) shield
Expand Down
12 changes: 6 additions & 6 deletions src/DABDUINO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ int8_t DABDUINO::playStatus(unsigned int data) {
byte dabCommand[7] = { 0xFE, 0x01, 0x05, 0x00, 0x00, 0x00, 0xFD };
if (sendCommand(dabCommand, dabData, &dabDataSize)) {
if (dabDataSize) {
data = dabData[0] + 1;
data = dabData[0];
return 1;
} else {
return 0;
Expand All @@ -477,7 +477,7 @@ int8_t DABDUINO::playStatus(unsigned int data) {

/*
* Radio module play mode
* return data: 1=DAB, 2=FM, 4=BEEP, 255=Stream stop
* return data: 0=DAB, 1=FM, 2=BEEP, 255=Stream stop
*/
int8_t DABDUINO::playMode(unsigned int data) {

Expand All @@ -487,7 +487,7 @@ int8_t DABDUINO::playMode(unsigned int data) {
if (sendCommand(dabCommand, dabData, &dabDataSize)) {
if (dabDataSize) {
if (dabData[0] != 0xFF) {
data = dabData[0] + 1;
data = dabData[0];
return 1;
} else {
data = dabData[0];
Expand Down Expand Up @@ -564,7 +564,7 @@ int8_t DABDUINO::setStereoMode(boolean stereo = true) {

/*
* Get stereo mode
* 1=force mono, 2=auto detect stereo
* 0=force mono, 1=auto detect stereo
*/
int8_t DABDUINO::getStereoMode(unsigned int data) {

Expand All @@ -573,7 +573,7 @@ int8_t DABDUINO::getStereoMode(unsigned int data) {
byte dabCommand[7] = { 0xFE, 0x01, 0x0A, 0x00, 0x00, 0x00, 0xFD };
if (sendCommand(dabCommand, dabData, &dabDataSize)) {
if (dabDataSize) {
data = dabData[0] + 1;
data = dabData[0];
return 1;
} else {
return 0;
Expand All @@ -585,7 +585,7 @@ int8_t DABDUINO::getStereoMode(unsigned int data) {

/*
* Get stereo type
* return data: 1=stereo, 2=join stereo, 3=dual channel, 4=single channel (mono)
* return data: 0=stereo, 1=join stereo, 2=dual channel, 3=single channel (mono)
*/
int8_t DABDUINO::getStereoType(unsigned int data) {

Expand Down

0 comments on commit cf33b1e

Please sign in to comment.