Bi-directional Port on a Baby Orangutan B-328P

I need to use the Bi-directional Port on a B-328P. I have two questions. Does anyone know were I can see some sample code of someone using a Bi-directional Port? Or read up on it?
And can some one tell me which port on the Baby Orangutan B-328P is the Bidirectional Port?

Thanks for the help… don’t mean to ask green horn questions…


Hello Dan,

The Pololu AVR Library contains support for digital I/O, Analog-to-digital conversion, and asynchronous serial communication. There are example programs included with the download that show you how to use all of these different I/O features of the Baby Orangutan.

The different pins on the Orangutan support different possible I/O modes. The ATmega328P documentation is where you look for information about specific pins.

If that is not enough to get you started, you can tell me more specifically what you want to do, and I will give you more pointers.


Paul thank you for the quick reply. I’ll let you know if i need more help.


I’m not sure what “bidirectional port” means. Based on your previous posts, I think you want to implement one-wire open-collector asynchronous serial communication. Is that what you wanted?


To be honest I’m not sure. I’m trying to us a Lanc video camera controller to control the speeds of a motor. The Lanc Jack only has 1 connection for data in and out.

My first goal was to read the info coming off of the Lanc controller… to verify the information coming off of it. So I connect it to a USB AVR Programmer using the power, ground and the RX. When power up, I get a pulsing Red Light on the controller. The light pulses two time then waits a couple of seconds and pulses again. This didn’t concern me. I see the controller do this when it fist connects to the camera. So when connected like this the controller doesn’t send any data, and doesn’t seem to think it is connected to anything… just power…

So my next I connect the camera’s lanc jack to the Data and the Ground… Powering the controller from the Lanc Controller the AVR Programmer. The controller runs the camera just perfect, no red light pulsing… I run Pololu Serial Transmitter utility to see what they are doing… When I first power the camera up, with in a second I get about 1000 lines of data. So I have to shut the camera off and give the app about a minute or to to catch up with writing out the data… this happens with Putty and Terminal app too.

I have done this a couple of times were I start the connection with the app, power up the camera, use the functions of the controller, shut down the camera, wait a few minutes for the code to stop printing out on the screen. But when I go though the code can’t seem to find any were where the info that camera though was the controller was telling the camera to zoom in or out… I’m looking for the code based off of the Lanc Protocol.

My next idea is to just try to understand how to communicate to the controller with the Baby Orangutan B-328P. See if I couldn’t send it a set of generic info from the B-328P and just write script to respond to the expected code.

Thanks again for all of your help guys…

Here is a small sample of the data that I’m getting…

FE 'þ'  FE 'þ'  FE 'þ'  FE 'þ'  F8 'ø'  F8 'ø'  E0 'à'  F8 'ø'  FE 'þ'  FE 'þ'  FE 'þ'  FE 'þ'  F8 'ø'  F8 'ø'  E6 'æ'  E0 'à'  FE 'þ'  FE 'þ'  FE 'þ'  DF 'ß'  F0 'ð'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  D7 '×'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  D7 '×'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  D7 '×'  DF 'ß'  DF 'ß'  DF 'ß'  7D '}'  FF 'ÿ'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  6F 'o'  DF 'ß'  6F 'o'  D7 '×'  DF 'ß'  DD 'Ý'  87 '‡'  F0 'ð'  DF 'ß'  DD 'Ý'  DF 'ß'  DF 'ß'  D9 'Ù'  DF 'ß'  D7 '×'  DF 'ß'  6F 'o'  DF 'ß'  6F 'o'  DF 'ß'  DF 'ß'  6F 'o'  DF 'ß'  6F 'o'  D7 '×'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  D7 '×'  DF 'ß'  DF 'ß'  DF 'ß'  FB 'û'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  D7 '×'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  D7 '×'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  D7 '×'  DF 'ß'  DF 'ß'  DF 'ß'  DD 'Ý'  DF 'ß'  DD 'Ý'  DF 'ß'  D9 'Ù'  D7 '×'  DF 'ß'  DF 'ß'  7D '}'  FF 'ÿ'  DF 'ß'  6F 'o'  DF 'ß'  DF 'ß'  6F 'o'  DF 'ß'  6F 'o'  D7 '×'  DF 'ß'  6F 'o'  DF 'ß'  DF 'ß'  6F 'o'  DF 'ß'  DF 'ß'  6F 'o'  DF 'ß'  6F 'o'  D7 '×'  DF 'ß'  6F 'o'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  D7 '×'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  D7 '×'  DF 'ß'  DF 'ß'  DF 'ß'  FB 'û'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  D7 '×'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DD 'Ý'  87 '‡'  F0 'ð'  DF 'ß'  DD 'Ý'  D7 '×'  DF 'ß'  D9 'Ù'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  DF 'ß'  D7 '×'  DF 'ß'  6F 'o'  DF 'ß'  6F 'o'  DF 'ß'  DF 'ß'  6F 'o'  DF 'ß'  6F 'o'  D7 '×'  DF 'ß'  6F 'o'  DF 'ß'  7D '}'  FF 'ÿ'  DF 'ß'  6F 'o'  DF

Well, if you were still confused, you should have continued discussing this with David in the original thread rather than starting an entirely new one.


Sorry Paul, I didn’t mean to case any problems. I was just going on to try and learn more about the Bidirectional port on the B-328P. I was trying to keep the questions in the right categories incase anyone else had similar questions in the future… Thats how I have been using this form to find info on other things… I apologies. I will try to continue the conversation with David in the other catagory… He has been very very very helpful.

Hi Dan,
It is really okay with everyone if the topic of conversation drifts from the programmer to the Baby Orangutan. Especially since David had already put some thought into how you could use the Baby Orangutan, it seems really strange to start an entirely new thread instead of just responding to the issues he raises there! Anyway, good luck, and I hope you get this working.


Thank you Paul.