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 May 22, 2015 · 10 comments
Open

SoftModem Library with Arduino 1.0 #2

GoogleCodeExporter opened this issue May 22, 2015 · 10 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 [email protected] 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 [email protected] 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 [email protected] 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 [email protected] 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 [email protected] 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 [email protected] 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 [email protected] 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 [email protected] 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 [email protected] on 8 Sep 2013 at 4:26

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

2 participants
@GoogleCodeExporter and others