Arduino Uno and de0nano problem

I have these 2 devices, the de0nano suppose to send data to the Arduino and the Arduino suppose to check the data and if the conditions are correct activate the buzzer.

using RF Link Receiver.

I am using NewSoftwareSerial (SoftwareSerial) library to read the information I am receiving in the rx-0 pin (SoftwareSerial.read()), after I upload the code to the Arduino and connect the wire to the rx-0 pin since I can't upload while the wire is connected, I start receiving random information translated to ASCii (de0nano not connected).

Also if I connect the de0nano and make it send data, I can't tell if the Arduino receiving any of it.

My questions:
1.How am I suppose to check the data in the rx-0 from the arduino side, I mean is the serial.read() is the right way?
2.Is there a way to receive the information not in ASCii a translating library maybe?

What is a deOnano and do you have a link to its specifications?

...R

No code, no schematic, I don't know what a "de0nano" is, and I don't have my crystal ball handy.

Wild guess: You are attempting to use SoftwareSerial on the hardware serial pins.

I am using NewSoftwareSerial (SoftwareSerial) library to read the information I am receiving in the rx-0 pin

Why? Use Serial for pins 0 and 1. Use SoftwareSerial with other pins!

RF Link Receiver

de0 nano
http://www.coe.montana.edu/ee/seniordesign/archive/FL11/ESIBalloon2/design-2.html

the transmitter the is connected to the de0nano

and also a weight sensor that is also connected to the de0nano
http://www.aliexpress.com/item/For-Arduino-Force-Sensitive-Resistor-0-5-Depending-On-How-Much-Pressure-is-being-applied/671861984.html

also in the attached file the schemes for all of it

Document (7).pdf (12 KB)

also here is the code

#include <stdlib.h>
#include <SoftwareSerial.h>

SoftwareSerial mySerial(0, 1);
int speakerPin = 9;
int tones[] = {261, 277, 294, 311, 330, 349, 370, 392, 415, 440};
//            mid C  C#   D    D#   E    F    F#   G    G#   A

int income = 0;


void setup()
{
  mySerial.begin(4800);
  while (! Serial); // Wait untilSerial is ready - Leonardo
}

void loop()
{
  recieveInputPassword();
}

void recieveInputPassword()
{
 if (mySerial.available() > 8)
  {
    for(int i = 0; i < 8; i++)
    {
      income = mySerial.read();
    
      mySerial.println(income, DEC);
      
      if(income == 52)
      {
         giveSignal();
      }
    }
    
    mySerial.println("SPACE");
  }
}

void giveSignal()
{
  int i;
  for(i = 0; i<3; i++)
  {
    tone(speakerPin, tones[0]);
    delay(1000);
    noTone(speakerPin);
  }
}

Why did you put a smiley in your code?

Oh, you didn't ?

You just didn't bother to read the How to Use the Forum and learn how to post code properly using code tags.

Please go back and fix your post.

...R

SoftwareSerial mySerial(0, 1);

You've been told that this is wrong. You haven't fixed it. But, you are still shining that the code doesn't work. Why?

I get same results with Serial, and SoftwareSerial,
also if I change to other pin I get other random numbers.
but the problem is the same

also if I change to other pin I get other random numbers.

What code? Which other pins? How do you know what the de0nano is actually sending? What does your serial output look like when you use SoftwareSerial on other pins? (You did connect your de0nano to those pins, and connect grounds, right?)

the output when pin 0 connected

0
0
0
248
0
0
0
248
SPACE
0
0
255
0
0
0
0
255
SPACE
0
255
0
0
0
0
254
252
SPACE
0
0
0
0
0
255
0
0
SPACE
0
0
0
0
0
0
0
0
SPACE
0
0
0
0
0
0
0
0
SPACE
0
0
0
0
128
0
252
0
SPACE
0
0
128
0
0
0
0
0
SPACE

the output with pin 7 connected

SoftwareSerial mySerial(7, 1);
170
85
175
245
255
175
215
255
SPACE
126
255
247
0
16
63
0
0
SPACE
0
0
128
31
128
0
5
0
SPACE
0
245
0
0
167
181
0
0
SPACE
5
0
5
8
7
160
69
127
SPACE
0
85
2
0
16
0
0
7
SPACE
173
214
0
117
2
0
0
0
SPACE
16
64
7
138
68
130
87
128
SPACE
199
117
160
0
117
2
0
0
SPACE

the grounds are connected as shown in scheme I uploaded earlier

and using now using the Serial and not the SoftwareSerial

#include <stdlib.h>
#include <SoftwareSerial.h>

int speakerPin = 9;
int tones[] = {261, 277, 294, 311, 330, 349, 370, 392, 415, 440};
//            mid C  C#   D    D#   E    F    F#   G    G#   A

int income = 0;


void setup()
{
  Serial.begin(9600);
  while (! Serial); // Wait untilSerial is ready - Leonardo
}

void loop()
{
  recieveInputPassword();
}

void recieveInputPassword()
{
 if (Serial.available() > 8)
  {
    for(int i = 0; i < 8; i++)
    {
      income = Serial.read();
    
    //mySerial.print("I received: ");
      Serial.println(income, DEC);
      
      if(income == 52)
      {
         giveSignal();
      }
    }
    
    Serial.println("SPACE");
  }
}

void giveSignal()
{
  int i;
  for(i = 0; i<3; i++)
  {
    tone(speakerPin, tones[0]);
    delay(1000);
    noTone(speakerPin);
  }
}

output

0
0
0
0
0
0
0
0
SPACE
0
252
0
0
0
0
0
0
SPACE
0
0
0
0
0
0
0
0
SPACE
0
0
0
0
0
0
0
0
SPACE
0
0
0
0
0
0
0
0
SPACE

all 3 times the output can go on forever

I'm completely confused now.

How can you be receiving data using Serial and also using Serial to send data to the Arduino Serial Monitor?

When you tried Software Serial, why did you use pins 7 and 1 knowing that 1 belongs to Hardware Serial?

What Uno are you using?

What data are you expecting / hoping to receive from the deOnano device? (In other words, how should I know that the output data you have posted is wrong)

...R