ROBOTC.net forums
http://www.robotc.net/forums/

LINEAR LEADER Mndsensors search for samples
http://www.robotc.net/forums/viewtopic.php?f=1&t=4872
Page 1 of 1

Author:  didiercoll [ Sat Sep 22, 2012 6:19 am ]
Post subject:  LINEAR LEADER Mndsensors search for samples

Hello

I trie to use Linear Learder Mindsensors

http://www.mindsensors.com/index.php?mo ... AGE_id=111

but all the samples give red crosses in the new robotC 3.51 ;

so I can not use it as I am a beginner in robotc ;

please would somebody know link with simple samples to use this device ?

it would be kind

didier

Author:  didiercoll [ Sat Sep 22, 2012 8:09 am ]
Post subject:  Re: LINEAR LEADER Mndsensors search for samples

In fact the " errors " are in this subroutine

************************************************************************/
/* */
/* Program Name: LL-lib.c */
/* =========================== */
/* */
/* Copyright (c) 2008 by mindsensors.com */
/* Email: info (<at>) mindsensors (<dot>) com */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; version 3 of the License. */
/* Read the license at: http://www.gnu.org/licenses/gpl.txt */
/* */
/************************************************************************/

and the error is about the send and read IC2

ie

sendI2CMsg (port, msg[0], 16);

*Error**:Calling procedure 'sendI2CMsg'. '*' Indirection levels mismatch. Parameter: 'unsigned const char * pSendMsg'. Expression: 'msg[0]'. Type: 'byte'

readI2CReply (port, replyMsg[0], 1);

**Error**:Calling procedure 'readI2CReply'. '*' Indirection levels mismatch. Parameter: 'unsigned char * pReplyBytes'. Expression: 'replyMsg[0]'. Type: 'byte'


it would be come from a new software in robotc version ?????

didier

Author:  Spiked3 [ Sat Sep 22, 2012 9:23 am ]
Post subject:  Re: LINEAR LEADER Mndsensors search for samples

replace ll-lib.c with the attached version, after extracting it from the zip file.

And look into http://botbench.com/blog/2012/04/11/rel ... uite-v2-6/ for a more permanent solution, although not available quite yet for the new robotc (that is why I said "look").

The recent changes to RobotC have required about all libraries to be rewritten (a welcome change), but older code will no longer work with the new version (fair isn't it?)

Attachments:
LL-lib.zip [1.88 KiB]
Downloaded 418 times

Author:  didiercoll [ Sat Sep 22, 2012 9:35 am ]
Post subject:  Re: LINEAR LEADER Mndsensors search for samples

Ok thanks a lot

it works

you are an expert

congratulation


yours

didier

Author:  didiercoll [ Sun Sep 23, 2012 11:37 pm ]
Post subject:  Re: LINEAR LEADER Mndsensors search for samples

Hello

In an other program , I use

HTGYRO-driver.h

which call the driver common.h

and I get these mistakes

so I put the " & " but .............

I get always the same error message

as we say in French :

" error before the river , is true after the river " ????????????? ( from Blaise Pascal )




**Error**:Calling procedure 'sendI2CMsg'. '*' Indirection levels mismatch. Parameter: 'unsigned const char * pSendMsg'. Expression: 'error_array[0]'. Type: 'ubyte'
**Error**:Calling procedure 'sendI2CMsg'. '*' Indirection levels mismatch. Parameter: 'unsigned const char * pSendMsg'. Expression: 'data[0]'. Type: 'tByteArray &'
**Error**:Calling procedure 'sendI2CMsg'. '*' Indirection levels mismatch. Parameter: 'unsigned const char * pSendMsg'. Expression: 'data[0]'. Type: 'tByteArray &'
**Error**:Calling procedure 'readI2CReply'. '*' Indirection levels mismatch. Parameter: 'unsigned char * pReplyBytes'. Expression: 'data[0]'. Type: 'tByteArray &'

it is strange because in the help

there is a " & " in the tittle

but no "&" in the sample

would you an idea about that ?

thanks

didier

void sendI2CMsg(const tSensors nPort, const byte &sendMsg, const int nReplySize)
(void) Send an I2C message on the specified sensor port.
Parameter Explanation Data Type
nPort A sensor port or name tSensors
sendMsg The message to send byte
nReplySize Specifies the length, in bytes, of the reply expected from the sensor. int

sendI2CMsg(i2cScanPort, i2cScanDeviceMsg[0], 8); // send a message from 'i2cScanDeviceMsg[0]' to
// 'i2cScanPort' (S1), expecting an 8 byte return message

Author:  NeXT-Generation [ Sun Sep 23, 2012 11:42 pm ]
Post subject:  Re: LINEAR LEADER Mndsensors search for samples

That's odd. It worked, and is still working fine for me. Here's my patched common.h file.

Attachments:
common.h [10.85 KiB]
Downloaded 505 times

Author:  didiercoll [ Mon Sep 24, 2012 12:00 am ]
Post subject:  Re: LINEAR LEADER Mndsensors search for samples

Well

thanks a lot

I am sorry but it gives always the same error , with or without your file ( " & " ) or not " & " ;

????

didier

Author:  NeXT-Generation [ Mon Sep 24, 2012 12:04 am ]
Post subject:  Re: LINEAR LEADER Mndsensors search for samples

You are using the latest version? 3.51?

Author:  didiercoll [ Mon Sep 24, 2012 12:12 am ]
Post subject:  Re: LINEAR LEADER Mndsensors search for samples

yes , I do sinde 18 09 20012

question

if I download 3.08 and work with it

what will happen

- now ?

- later ?

didier

Author:  NeXT-Generation [ Mon Sep 24, 2012 12:19 am ]
Post subject:  Re: LINEAR LEADER Mndsensors search for samples

If you download 3.08, then you can use an older version of the driver suite. However, be aware that code you write in 3.08 might not be compatible with newer versions.

Or, you could wait until Monday or Tuesday or whenever Xander releases the update for the suite.

Author:  didiercoll [ Mon Sep 24, 2012 12:21 am ]
Post subject:  Re: LINEAR LEADER Mndsensors search for samples

OK

I think you are true

it is a big and great job he is doing ;

thanks to him ... and you

didier

Author:  didiercoll [ Tue Sep 25, 2012 10:52 am ]
Post subject:  Re: LINEAR LEADER Mndsensors search for samples

Hello

well

in fact it seems that Bot Bench drivers are not exactly " drivers " bur " headers " ;

so , as I am not an " expert " :-( and " french " :D and " learner " , :oops:

after reading that on PDF :shock:

Click on the Browse button for the Source Files directory path and select whatever path you’ve been using to store your ROBOTC programs. This tutorial assumes you are using D:\Programming
Click on the Browse button next to the Include files for Platform NXT and select D:\Programming\rdpartyrobotcdr-2.5. The final result should resemble the window below:................


I have put the files with " drivers " and samples in my robotc directory ; :lol:

and I had a lot of problems with files and " drivers " ; :twisted:

now I put files and " drivers " in the same directory and no error code when I compile ; :D

we can also put the " drivers " here , if I have understand well ; :?:

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ROBOTC\rdpartyrobotcdr-v2.8\drivers

these rules are good to know ;

if there is a mistake , please tell me

thanks

didier

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/