Author Topic: Colorpal sensor and Axon2  (Read 1877 times)

0 Members and 1 Guest are viewing this topic.

Offline teoxanTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 2
Colorpal sensor and Axon2
« on: June 10, 2010, 06:57:35 AM »

Hi,

I recently purchased the ColorPal sensor from Parallax http://www.parallax.com/Store/Sensors/ColorLight/tabid/175/CategoryID/50/List/0/SortField/0/Level/a/ProductID/617/Default.aspx, it's a nice color sensor to do some basic color recognition and/or ambient light detection.

This sensor communicates with  simple serial commands, but the issue is that it has only one pin which needs to toggle between send/receive.
According to the instructions datasheet, first we need to set it in "Direct Mode" ( by using high/low on the digital pin) and then send commands to it to start color recognition.

I was thinking of using an I/O in the Axon and use the software UART, but having only one pin for communication I was wondering if i can toggle an I/O pin to be RX and  TX.

Is that possible?

thanks

Theo

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Colorpal sensor and Axon2
« Reply #1 on: June 12, 2010, 10:08:07 AM »
This sounds just like the Ping sonar code in WebbotLib . . . have a look into that and you can probably hack it to do what you want.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: Colorpal sensor and Axon2
« Reply #2 on: June 12, 2010, 11:05:03 AM »
Unlike the Ping it uses serial data input and output with auto baud detection.
You could try it two ways:
1. Either add the hardware as shown in the WebbotLib for the Dynamixel AX12 servos. This uses a UART tx/rx pins plus a direction pin that connects only one of them at a time to the single serial pin on the device.
2. Or you could try using a software UART and then use the same pin in the MAKE command for both the Tx and Rx pin.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline teoxanTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 2
Re: Colorpal sensor and Axon2
« Reply #3 on: June 12, 2010, 05:01:45 PM »

I think I'll try the software UART with same pin rx/tx.

I'll update when I have some results.

Thanks guys!

Theo

Offline Japd

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Re: Colorpal sensor and Axon2
« Reply #4 on: August 18, 2011, 09:20:08 PM »
Did you get to configure it? I'm working with the same sensor/Axon II right now.

 


Get Your Ad Here

data_list