Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoftModem Library with Arduino 1.0 #2

Open
GoogleCodeExporter opened this issue Sep 19, 2015 · 11 comments
Open

SoftModem Library with Arduino 1.0 #2

GoogleCodeExporter opened this issue Sep 19, 2015 · 11 comments

Comments

@GoogleCodeExporter
Copy link

1. Copy the SoftModem-004.zip in library 
2. Copy the example in a new file
3. Compile with arduino 1.0 ide

Compilation fails with error:

In file included from softmodem.cpp:1:
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
h:72: error: conflicting return type specified for 'virtual void 
SoftModem::write(uint8_t)'
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino
/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)'

This is the example:
#include <SoftModem.h>
#include <ctype.h>

SoftModem modem;

void setup()
{
  Serial.begin(57600);
  delay(1000);
  modem.begin();
}

void loop()
{
  while(modem.available()){
    int c = modem.read();
    if(isprint(c)){
      Serial.println((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);
    }
  }
}


Original issue reported on code.google.com by mattiafr...@gmail.com on 2 Feb 2012 at 12:27

@GoogleCodeExporter
Copy link
Author

hello! I'm having the same error. Do you already have the solution? Thank you

Original comment by pdr...@gmail.com on 7 Feb 2012 at 10:09

@GoogleCodeExporter
Copy link
Author

This is a patch which update the compatibility for the old and the new arduino.

Original comment by mattiafr...@gmail.com on 10 Feb 2012 at 3:08

Attachments:

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Ok forget my previous comment, here is a patched version of SoftModem, worked 
perfectly , thanks mattia :) 

Original comment by yehy...@gmail.com on 20 Feb 2012 at 3:13

Attachments:

@GoogleCodeExporter
Copy link
Author

Had the same issue, resolved by the above patch.  Thanks for contributing.

Original comment by toddwpr...@gmail.com on 27 May 2012 at 3:48

@GoogleCodeExporter
Copy link
Author

Hello I have had similar problems as above. Would someone mind reposting the 
patch? Google says the link is invalid.  Thanks for the info!

-Nick

Original comment by technic...@gmail.com on 27 Jul 2012 at 4:29

@GoogleCodeExporter
Copy link
Author

I tried to use SoftModem with arduino pro mini (3.3v, 8MHz), but the 
demodulation process doesn´t work.
When i use the arduino uno everything work very fine.
Could you help me please.

Original comment by jaiber...@gmail.com on 3 Sep 2012 at 9:42

@GoogleCodeExporter
Copy link
Author

With arduino 1.0.1 I get the following compile errors using the patched version:

/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp: In member function 'void SoftModem::begin()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:109: error: 'TCNT2' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:112: error: 'TCCR2A' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:113: error: 'TCCR2B' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp: In member function 'void SoftModem::end()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:120: error: 'TIMSK2' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:120: error: 'OCIE2A' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp: In member function 'void SoftModem::demodulate()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:139: error: 'TCNT2' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:142: error: 'TIFR2' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:142: error: 'TOV2' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:170: error: 'OCR2A' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:171: error: 'TIFR2' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:171: error: 'OCF2A' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:172: error: 'TIMSK2' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:172: error: 'OCIE2A' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp: In member function 'void SoftModem::recv()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:235: error: 'TIMSK2' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:235: error: 'OCIE2A' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp: In function 'void TIMER2_COMPA_vect()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:247: error: 'OCR2A' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp: In member function 'void SoftModem::modulate(uint8_t)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:284: error: 'OCR2B' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:285: error: 'TIFR2' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:285: error: 'OCF2B' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:290: error: 'OCR2B' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:291: error: 'TIFR2' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SoftModem/SoftModem.
cpp:291: error: 'OCF2B' was not declared in this scope

Has anyone else had this problem?

Thanks!

Adam

Original comment by adam.h.m...@gmail.com on 19 Nov 2012 at 8:37

@GoogleCodeExporter
Copy link
Author

Hello, I'm trying to get new high and low frequencies, but demodulation doesn't 
work.Could you give me a tip?

Original comment by ruy.teix...@gmail.com on 8 Sep 2013 at 4:26

@aegis1980
Copy link

@GoogleCodeExporter I have the same error.
A bit of googling indicated that these out-ofscope errors are because I am using Leonardo board which uses different timers - the Softmodem library is coded to be ATmega328 specific.
Which is a pain.
http://arduino.stackexchange.com/questions/10011/tccr1a-and-tccr2a-on-leonardo
Now looking into if and how you can port to Leonardo timers.

@perttikellomaki
Copy link

@aegis1980 did you have any success with the ATmega32u4 port?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants