Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTRSensors Library for Pinguino P8 and P32
10-05-2016, 03:45 PM,
#1
QTRSensors Library for Pinguino P8 and P32
Hi All,

I have been working with a QTR sensors library for a line follower robot.
For such a purpose I had to adapt the Pololu QTRSensors library from Arduino to Pinguino, and I am glad to share it with all of you.

The robot is called Hermes, it is based in the Pinguino PIC32MX250F128B. The robot was developed with my students for a local robotic competition. We won the championship!

Here I attach an image of "Hermes"(the line follower) and "Baron Rojo" (a mini-sumo bot based on the Pinguino PIC18F4550).

[Image: 9095e9023ad3f01a7a8a2821aa9a4441o.jpg]

Here you an see a video of the resulting library in action! All the code was written in Pinguino IDE.

https://youtu.be/jvkaacD3qEo

I attach the complete modified library that works in Pinguino IDE:

https://drive.google.com/open?id=0BwlBs9...FpmNFpYcWc

You will find the instructions to install in the file leer.txt

Under Programa folder you will find a example line follower robot code plus a library test code.

I hope you find it useful.

Any comments are welcome.

Regards,

Leonardo.
Reply
10-05-2016, 09:23 PM,
#2
RE: QTRSensors Library for Pinguino P8 and P32
Congratulations !

May I add the QTR sensors library and your example in the v12 ?
Do you mind if I make a link to the video on the blog and on the main page of the Pinguino site ?
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
11-05-2016, 12:20 PM,
#3
RE: QTRSensors Library for Pinguino P8 and P32
Hi regis

Sure, my students and I will be proud to be in the Pinguino main page!

And of course, you can include the library and the example in the V12 IDE.

I attach a image of the complete Robotic Team of the secondary school E.S.E.T.P. N°748 from Trelew city, Argentina. We achieve this result with team work.

The competition was developed in the Department of Informatics of the Universidad de la Patagonia San Juan Bosco (UNPSJB) at Trelew.

Thanks for keep the good work and development of Pinguino IDE.

Regards,

Leonardo.


Attached Files Thumbnail(s)
   
Reply
28-05-2016, 01:45 PM,
#4
RE: QTRSensors Library for Pinguino P8 and P32
Leonardo
which QTR module are you using QTR-8RA or RC.

thank you 
fred
Reply
31-05-2016, 12:11 PM,
#5
RE: QTRSensors Library for Pinguino P8 and P32
Hi Fred,

I have modified the Pololu QTR library to support the RC type of sensors only.
You can define any number of sensors (i.e. 1, 2, 3, 8, etc) in the initialization section.

Regards,

Leonardo.
Reply
31-05-2016, 01:28 PM,
#6
RE: QTRSensors Library for Pinguino P8 and P32
Leonardo.
have you tried this with the new V12?
thanks
fred
Reply
01-06-2016, 12:08 PM,
#7
RE: QTRSensors Library for Pinguino P8 and P32
Hi Fred,

My apologies, the library will not work for P8 devices, for now only for P32 devices.
As you pointed out, the code does not compile, I have to tweak it to make it work on P8.
Apart from some missing include files, the P8 libraries does not have a micros() function implemented, and this is required for QTRSensor library. I will try to get a workaround on this.
As soon as I get the library working and fully tested for P8, I will be posting it.

Thanks for the feedback! Sorry for the inconvenience

Regards,

Leonardo.
Reply
01-06-2016, 12:54 PM,
#8
RE: QTRSensors Library for Pinguino P8 and P32
(01-06-2016, 12:08 PM)Leonardo Wrote: Hi Fred,

My apologies, the library will not work for P8 devices, for now only for P32 devices.
As you pointed out, the code does not compile, I have to tweak it to make it work on P8.
Apart from some missing include files, the P8 libraries does not have a micros() function implemented, and this is required for QTRSensor library. I will try to get a workaround on this.
As soon as I get the library working and fully tested for P8, I will be posting it.

Thanks for the feedback! Sorry for the inconvenience


Regards,

Leonardo.

thank youfred
Reply
01-06-2016, 01:39 PM,
#9
RE: QTRSensors Library for Pinguino P8 and P32
@fred
Would you send to Leonardo the corrected QTRsensors.c file, adapted to P8 compiler ? You said it compiled. NO or YES ?

At least this will avoid to Leonardo to search for some changes !

Probably your troubles come from signal timing.

André
Reply
02-06-2016, 02:07 AM,
#10
RE: QTRSensors Library for Pinguino P8 and P32
Leonardo.
please see the attached QTR files i have not had any luck with it working it seems to hang in calibrating white line and all of the CDC.print do not show up on the terminal screen.
thank you
fred


Attached Files
.c   QTRSensors.c (Size: 12.28 KB / Downloads: 1)
.h   QTRSensors.h (Size: 5.65 KB / Downloads: 0)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)