View unanswered posts | View active topics It is currently Mon Jul 28, 2014 10:26 am






Reply to topic  [ 12 posts ] 
LINEAR LEADER Mndsensors search for samples 
Author Message
Novice

Joined: Sat Sep 15, 2012 11:28 am
Posts: 68
Post 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


Sat Sep 22, 2012 6:19 am
Profile
Novice

Joined: Sat Sep 15, 2012 11:28 am
Posts: 68
Post 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


Sat Sep 22, 2012 8:09 am
Profile
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post 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 250 times

_________________
Mike aka Spiked3
http://www.spiked3.com
Sat Sep 22, 2012 9:23 am
Profile
Novice

Joined: Sat Sep 15, 2012 11:28 am
Posts: 68
Post Re: LINEAR LEADER Mndsensors search for samples
Ok thanks a lot

it works

you are an expert

congratulation


yours

didier


Sat Sep 22, 2012 9:35 am
Profile
Novice

Joined: Sat Sep 15, 2012 11:28 am
Posts: 68
Post 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


Sun Sep 23, 2012 11:37 pm
Profile
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post 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 228 times

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.
Sun Sep 23, 2012 11:42 pm
Profile WWW
Novice

Joined: Sat Sep 15, 2012 11:28 am
Posts: 68
Post 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


Mon Sep 24, 2012 12:00 am
Profile
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Re: LINEAR LEADER Mndsensors search for samples
You are using the latest version? 3.51?

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Mon Sep 24, 2012 12:04 am
Profile WWW
Novice

Joined: Sat Sep 15, 2012 11:28 am
Posts: 68
Post 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


Mon Sep 24, 2012 12:12 am
Profile
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post 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.

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Mon Sep 24, 2012 12:19 am
Profile WWW
Novice

Joined: Sat Sep 15, 2012 11:28 am
Posts: 68
Post 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


Mon Sep 24, 2012 12:21 am
Profile
Novice

Joined: Sat Sep 15, 2012 11:28 am
Posts: 68
Post 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


Tue Sep 25, 2012 10:52 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 12 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:  



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