Roboeye and Basic stamp 2
coors
Posts: 28
I am using the Roboeye Camera connected to the Basic Stamp 2e with the BOE.· What· I am trying to do is have·the·roboeye camera·turn on and capture the image when a signal is sent to it by the micorcontroller.· I have the controller already sending a signal to an LED on the BOE.· I have the roboeye connected to P15 on the BOE.· I have verified that data is going through to the roboeye by using a counter program .· However I need the roboeye to be activated(turned on) and capture images for 15 seconds when the·roboeye receives·a signal and then discontinue.
Any help would be appreciated
Any help would be appreciated
Comments
bugg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Geordi: "It's like the laws of physics went right out the window!"
Q: "And why shouldn't they, there so inconvinient!"
Geordi LaForge, Chief Engineer, USS Enterprise, NCC 1701-D
Q, Omnipotent Prankster
serout 15, recommended timing ?? (power the roboeye to start caputure imageing)
camera starts capturing image for a set amount of time.
Sends image back to pc (which already does through robeye software)then somehow ( not too sure ) save it to a file.
Any help on this...kinda frustrated
Thanks
The roboeye will always be powered just need code on to somehow start the auto capture for certain time..then stop it the capture after the time passes..then save that to a file.
'
[noparse][[/noparse] Title ]
' {$STAMP BS2e} ' Stamp directive
' {$PBASIC 2.5} ' PBASIC directive
'
[noparse][[/noparse] Variables ]
camera VAR Byte
time VAR Byte
'
[noparse][[/noparse] Main Routine ]
controlPanel:
SEROUT 15, 84, [noparse][[/noparse]"Engage Camera ?", CR]
SERIN 15, 84, [noparse][[/noparse]camera]
PAUSE 10
SEROUT 15, 84, [noparse][[/noparse]"Length of Camera Time", CR]
SERIN 15, 84, [noparse][[/noparse]DEC3 time]
PAUSE 10
IF camera = "Y" THEN Engage_Camera
IF camera = "N" THEN DisEngage_Camera
GOTO controlPanel
'
subroutines
Engage_Camera:
SEROUT 15, 84, [noparse][[/noparse]"Camera is Engaged", CR]
'engages capture mode in camera for 'time' entered
DisEngage_Camera:
SEROUT 15, 84, [noparse][[/noparse]"Camera is not engaged", CR]
' nothing is done
????Do not know what to add as code in the engage camera subroutine???
????Just want it to be in capture mode for a certain time
???
I have been looking at your RoboEye Project requirements. After
Rereading the RoboEye manual 10 times and experimenting all
Afternoon I can’t get the BOE to issue commands to the RoboEye
Camera board. It looks like the BOE can send data to the PC
Terminal and the PC Terminal can send data to the BOE thru the
RoboEye Camera board only. I tried the following code:
FOR counter = 1 TO 5
SEROUT 14, 84,[noparse][[/noparse]"echo", CR, LF ]
SEROUT 14, 84,[noparse][[/noparse]BIN4 $1B, BIN4$54, BIN4 $20, BIN4 $0D]
SEROUT 14, 84,[noparse][[/noparse]"Counter = ", DEC counter, CR, LF ]
DEBUG "Counter = ", DEC counter, CR
PAUSE 1000
NEXT
Typing ECHO
Then
Typing #27T 20#13 at the PC terminal will make the
Will make the picture scan once.
I will keep looking at this as I have a need to make this happen also.
Thank You
Dave Winchell
I read the thread. As I understand you want to start a picture transmission from RoboEye to PC, isn't it?
Please have a look at the following program snippet. A simple main loop starts a picture transmission periodically, using the "T" command. The speicial T comand code is in the subroutine SUB_ComT.
Note that the routine·shows also the different styles of serial data (with or without ESC·character). I think for your needs the first SEROUT wasn't neccessary.
Hope it would help
Jens
'{$STAMP· BS2}······· 'STAMP directive (specifies a BS2)
'{$PBASIC 2.5}
serStr· VAR···· Byte(5)···· ' reserve 5 byte
bCount· VAR···· Byte
Start:
··· serStr(0) = 27········· ' ESC
··· serStr(1) = "T"········ ' T - Command
··· serStr(2) = "2"
··· serStr(3) = "5"
··· serStr(4) = 13········· ' CR
··· bCount = 0
··· DEBUG CLS, "RoboEye - T-Command", cr
main:································· ' endless loop
··· GOSUB SUB_ComT
··· PAUSE 5000
··· GOTO main
' *****************
' *· T - Command· *
' *****************
' The first SEROUT sends data to the RoboEye terminal window on PC
' The data string has to be terminated by CR. All data go through
' RoboEye transparently
' The second SEROUT starts with an ESC character, that means the
' RoboEye expected a following comand. In the example ESC was followed
' by "T25" and is terminated by CR. In the result the picture transmisson
' starts for 25 times.
SUB_ComT:
··· DEBUG "#27T25#13", CR
··· SEROUT 15, 84, [noparse][[/noparse]"Pic = ", DEC bCount, CR] ' data to terminal
··· PAUSE 500································ ' wait until data will be sent
··· bCount = bCount + 1
··· SEROUT 15,84,[noparse][[/noparse]STR serStr\5]·············· ' starts picture transmission
··· RETURN
Anyways what I am messing with now is the save option.· I was gonna try to save the entire video feed when it is transmitting but I believe this is not possible.· SO what I am trying to do is every time there is a picture transmission in the subroutine it automatically saves it in a folder.· So if the picture transmission is 5 times there will be 5 different picture captures saved.· Look at code for more detail onto where I am talking about.
'{$STAMP· BS2E}·······
'{$PBASIC 2.5}
serStr· VAR···· Byte(5)···· ' reserve 5 byte
bCount· VAR···· Byte
Start:
··· serStr(0) = 27········· ' ESC
··· serStr(1) = "T"········ ' T - Command
··· serStr(2) = "2"
··· serStr(3) = "5"
··· serStr(4) = 13········· ' CR
··· bCount = 0
··· 'DEBUG CLS, "RoboEye - T-Command", CR
· DO
··· GOSUB SUB_ComT
··· PAUSE 5000
'Here is where the function would come in to save it to a file ie. event1
'then would do the loop again and save the next transmission ie. event2
'continues until it breaks out of loop
·LOOP UNTIL bCount = 5
· END
SUB_ComT:
··· DEBUG "#27T25#13", CR
··· SEROUT 15, 84, [noparse][[/noparse]"Pic = ", DEC bCount, CR] ' data to terminal
··· PAUSE 500································ ' wait until data will be sent
··· bCount = bCount + 1
··· SEROUT 15,84,[noparse][[/noparse]STR serStr\5]·············· ' starts picture transmission
·RETURN
nice to hear that the program works. Theoretically incomming picture data could be saved on PC. But that's not an easy work. The·USB unit is connected as a virtual com port, that means you can communicate with the USB board without the RoboEye PC application. In this case you have to write your own PC application.
To watch about the incomming picture data you need·a terminal program with 921000 Baud. Open the original RoboEye software, connect the USB·unit and check if your BS2 programm work. Than close the RoboEye software without pressing the disconnecting button. Now the USB board·stays·in receiving mode (the yellow LED has to be flashing during incomming data). If you now open the terminal program·with the virtual com port (on my PC it is COM5) the terminal shows·a lot of characters. Most of it are non printable, exept·the string "Pic = ", DEC bCount, CR].
I hope I made not to much confusion.
Jens
Thanx
I'm so sorry, but that function is not available at the moment. I'll ask the programmer of the PC application software if he could implement a command string that will start any· of the "button clicks" by a message into the terminal window.
Regards
Jens
>picture data could be saved on PC. But that's not an easy work.
>The USB unit is connected as a virtual com port, that means you
>can communicate with the USB board without the RoboEye PC
>application. In this case you have to write your own PC application.
Jens and I guess the Parallax folks,
I'm interested in interfacing with the Roboeye mod through my own application. Given that it's all a serial interface the commands are relatively straightforward to emulate, but what format is the incoming picture data in? I couldn't find that in the documentation anywhere, but I've been known to miss things.
P.s. I'm a programmer so don't worry about throwing me off too much with the complexity of the software [noparse]:)[/noparse]
Thanks
Mike
I'm in discussion with Ken how we could communicate technical parameters for programmes which want to made his own appl
**for programmes which want to made his own appl
I'll meet Ken ending of March. I hope we found a way for publish source and/or hardware of the RoboEye.
Best regards,
Jens