Skip to content

SoftModem Library with Arduino 1.0 #2

Description

@GoogleCodeExporter
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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions