View unanswered posts | View active topics It is currently Sat Nov 01, 2014 5:09 am






Reply to topic  [ 2 posts ] 
NXTBee Mark Crosbie's Drivers 
Author Message
Rookie
User avatar

Joined: Tue Aug 11, 2009 11:49 pm
Posts: 38
Location: Tasmania, the Land Down Under, the Land Downunder!
Post NXTBee Mark Crosbie's Drivers
Hi All,

Has anyone tried to compile code which uses Mark Crosbie's NXTBee RobotC Drivers?

As yet I haven't succeeded with RobotC v3.40-55.

Mark Crosbie's test code:
Code:
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

// SendSimpleData.c
//
// Test sending single data values to a receipient
// (either another NXT or a PC/Mac)
//
// The data values change each iteration, so you should
// see changing values on the receiver.
//
// Run this on a NXT with a NXTBee attached to port 4.
//
// To receive data on another NXT run the Receiver.c program
// on the NXT. To receive data on your PC/Mac run the Reader.pde
// Processing sketch. You can run two receivers concurrently,
// they should both get the same values sent by this program.
//
// Copyright 2012 Mark Crosbie mark@mastincrosbie.com
// http://www.mastincrosbie.com/Marks_LEGO_projects
//

#include "NXTBeeComms.h"

// default broadcast this message
#define ADDR BROADCAST

task main() {

  long lvalue;
  int ivalue;
  byte bvalue;
  string s;

  eraseDisplay();
  bNxtLCDStatusDisplay = false;
  setupHighSpeedLink();

  nxtDisplayString(1, "NXTBee Send Test");

  bvalue = 123;
  lvalue = -12345678;
  ivalue = -32768;

  while(nNxtButtonPressed != kEnterButton) {


      nxtScrollText("Sending %d   ", ivalue);
      transmitInt(ADDR, ivalue--);
      wait10Msec(50);

      nxtScrollText("Sending %d   ", lvalue);
      transmitLong(ADDR, lvalue++);
      wait10Msec(50);

      nxtScrollText("Sending %d   ", bvalue);
      transmitByte(ADDR, bvalue++);
      wait10Msec(50);

 }

}

COMPILER ERRORS
Code:
File "SendSimpleData.c" compiled on Feb 11 2013 18:17:29
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'transmitBuffer[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'memcpy'. Parameter: 'void * pToBuffer' is 'b' of type 'byte &'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'receiveBuffer[0]' of type 'ubyte'.
**Info***:'len' is written but has no read references
**Error**:'*' Indirection levels mismatch. Call to 'memcpy'. Parameter: 'void * pToBuffer' is 'b' of type 'byte &'.
**Error**:'*' Indirection levels mismatch. Call to 'memcpy'. Parameter: 'void * pToBuffer' is 'transmitBuffer[HEADER_SIZE]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'memcpy'. Parameter: 'void * pToBuffer' is 'transmitBuffer[HEADER_SIZE]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'memset'. Parameter: 'void * pToBuffer' is 'transmitBuffer[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'transmitBuffer[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'memcpy'. Parameter: 'void * pToBuffer' is 'transmitBuffer[i]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'memcpy'. Parameter: 'void * pToBuffer' is 'transmitBuffer[i]' of type 'ubyte'.
*Warning*:Unreferenced variable 's'

Mark Crosbie's NXTBee Driver and Example Files are attached (NXTBeeComms_RobotC.zip).

If anyone could please help me out I would be very grateful? I'm by no means a programmer, and have been stumped by this issue for quite a while now.

I need reliable and fast to-way communication two NXTs. I decided to dust of my NXTBees, as I'm sick of the unreliable Bluetooth Comms between NXTs on my current project.


Attachments:
NXTBeeComms_RobotC.zip [17.27 KiB]
Downloaded 281 times

_________________
regards

Sparra Mc


Image
Mon Feb 11, 2013 3:23 am
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3240
Location: Rotterdam, The Netherlands
Post Re: NXTBee Mark Crosbie's Drivers
Ray,

Pop me a mail, I'll take a look at it when I get home, should be fairly simple to fix.

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Mon Feb 11, 2013 4:59 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.