View unanswered posts | View active topics It is currently Tue Dec 18, 2018 5:22 pm






Reply to topic  [ 3 posts ] 
RobotC 4.26 EV3 sensor problems 
Author Message
Rookie

Joined: Sun Oct 05, 2014 7:19 am
Posts: 3
Post RobotC 4.26 EV3 sensor problems
Hi everybody,

I'm new to RobotC and just started playing around with my EV3. Unfortunately I'm having some issues with the sensors and even the simplest programs. Luckily I found two threads describing similar problems. So maybe I'm not that stupid after all and there might be some issues with the current version of RobotC.

My first programs all involved some kind of obstacle detection with the IR sensor. But it didn't work out for some reason and the brick often froze and I had to reboot it. After a lot of trial and error I changed the ports. The IR sensor worked as intended on S2, but never on S1. Though in the bricks port view and in the debug window of RobotC everything looked fine. But as soon as I started the program with the IR sensor connected on S1, the program froze after the first reading and the value of the sensor in the debug window showed "1.$".

Everything was ok with the IR sensor connected to S2 until I changed the mode to "seeker" for IR detection. The seeker-mode only worked correctly on S4.

My second problem involves the touch sensor. It does not seem to work on any port. Though I still have to make some additional tests. But even the example program did not run.

BTW: I always adjusted the pragma definitions to reflect the current setup of my robot.

The two threads I mentioned above with similar problem descriptions:
EV3 Touch Sensors - 4.26
RobotC 4.25 - IR Sensor restricted to port 2?

Any thoughts or ideas? If you need more input or want me to run a sample code, please tell me.


Kind regards,
Stefan


Sun Oct 05, 2014 7:48 am
Profile
Rookie
User avatar

Joined: Wed Jun 04, 2014 4:06 pm
Posts: 30
Location: Margraten, The Netherlands
Post Re: RobotC 4.26 EV3 sensor problems
Hi Stefan,

I'm still waiting on a respons of RobotC on my thread "RobotC 4.25 - IR Sensor restricted to port 2?", so I can't help you any further at the moment.

Kees


Sun Oct 05, 2014 12:38 pm
Profile
Rookie

Joined: Sun Oct 05, 2014 7:19 am
Posts: 3
Post Re: RobotC 4.26 EV3 sensor problems
Thanks Kees!

@all: I solved my touch sensor problem. The sensor works fine, but the sample code from the help document does not work.

Code:
//This code will make the robot run forward at a speed of 50
 repeatUntil(getTouchValue(S1) == 1)
 {
   //Set both left and right motors to run at 50% speed (continuously)
  ....
 }
 


Best regards
Stefan


Sun Oct 05, 2014 4:11 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 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.