Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: Strange result for concatenation operation on: October 22, 2013, 10:43:38 am
@ Groove

I know that , due to the number's original integer range of values , it can be negative  , but how did you figure it out ? Those 2 bytes of digits tell me that i have a negative number ?  0xf0ff is just an example  , i'm receiving this format for almost any number , except when The High Byte is 0x0000

@ michinyon

Yes this is the code that i actually used , i tryed both codes with the same result  , but if you both say that it's correct  , thank you
But i still don't know how to recognise negative numbers.
2  Using Arduino / Programming Questions / Strange result for concatenation operation on: October 22, 2013, 01:14:33 am
Hello,

I want to concatenate two neighbouring values in an 1-D Array  , for this i used the provided example code but i keep getting strange results .

int x=payloadData[2]; //
      int y=payloadData[3]; //
//The first byte of the Value represents the high-order bits of the twos-compliment value, while the second byte represents //the low-order bits  
// the original number has a range of  -32768 to 32767  
      
     x<<=8;                                        
      x|=y;
  
      Serial.println(" val_BIN: ");
      Serial.println(x, BIN);
       Serial.println(" val_DEC: ");
      Serial.println(x ,DEC);
   Serial.println(" val_HEX: ");
      Serial.println(x ,HEX);
      
      
i also tried this

    //  int z = y|(x<< 8 );
      Serial.println(" val_BIN: ");
      Serial.println(z,BIN);
       Serial.println(" val_DEC: ");
      Serial.println(z,DEC);
  Serial.println(" val_HEX: ");
      Serial.println(z,HEX);

I displayed the result in this 3 modes in order to see what's happening

For example if  x = 11110000
                             y = 1 1 1 1 1 1 1 1

In Binary it displayes this :                 1111111111111111 1111000011111111   // i do get x concatenated with y but it also containes 2 bytes of "ones " as a header
In HEX i get the correct result  F0FF
In DEC i get some negative numbers...

Can somenone figure out what am i missing ?
      
3  Topics / Robotics / Re: Voice Controlled Robot on: May 07, 2013, 03:40:40 am
The reason is very simple .
I choose Xbee because of it's Ease of use. You just need to configure and pair them very easly and they take care of the rest.  You will only need the Serial.write function to sent anything  And the if (  Serial.available >0 ) statement to receive
4  Topics / Robotics / Re: Voice Controlled Robot on: February 10, 2013, 11:59:01 am
No , The reason i ask for feedback , it's just the way i explained it.
I'm not having problems implementing my idea , i just want other microcontroller users opinions regarding this idea. It's simple.
That brief overview doesn't describe an imposed idee , but an idea proposed by every participant
If you don't believe me , i will attach you the contest rules
5  Topics / Robotics / Voice Controlled Robot on: February 10, 2013, 09:25:22 am
Hello Everyone

I'm attending a Project Design Competion , and one of it's requirements is to post my idea on forums to receive feedback

That's why a i would like to ask everyone who wants to give me any kind of feedback , sugesstions / ideas etc.

Here's the projects brief overview from the Design Report Form

Brief Overview

Our goal is to make a simple , but versatile robot capable of interacting with humans and the surrounding environment just by listening to some simple voice commands.  As a general architecture , the project it’s made of two main wireless linked entities : The actual robot , based on the chipKit UNO 32 Microcontroller ( a new PIC32 based arduino compatible microcontroller ) linked to the outside world through his sensors , and the voice controlled remote based on the Easy VR Voice Recognition Device connected to an Arduino Microcontroller board.

The device represents the core of the project and is responsible for processing the voice commands and for sending them to the remote control’s microcontroller board ( the control unit )a digital signal containing the command’s ASCII character components.
For the remote’s control unit , the received word acts as a password which corresponds to a single user-defined executable code and will be sent to the robot using wireless serial communication with 2 XBee modules
It is also able to reply to it’s master by sending back to the remote his status, meaning : what is he doing ,  what does he have to report ,and the feedback  to our commands and by displaying them on the LCD Display , and by answering with a specific sound.
Just by saying the key word it will be able to make it’s way through the room, doing reconnaissance and gathering the data we want regarding his environment . This is especially done with IR proximity  Sensors that enable the robot to find objects or to avoid the obstacles in his path, and respectively the data gathering is done by using environment  sensors  for temperature , gas presence and other important parameters evaluation for the user’s safety.
But not only that , the robot it’s able to recognize more user defined commands , so the applications possible are only limited by the users imagination.  In our project’s case , besides the very basic commands that control motion  the defined commands are related to the robot’s searching ability and to his environment sensors feedback
Problem to Solve
This highly versatile design that can be used in a dangerous area for humans for recognition and also in military applications, for accompanying the soldiers in battle, eliminates the need for a sophisticated remote control or a complicated mean of communication which is a reality for a high-skilled robot , in essence this innovation simplifies very much the use of such equipment

Thank you for your time.
Regards,
Pages: [1]