Search found 24 matches

by europa81
Sat May 13, 2017 1:18 am
Forum: Announcement
Topic: GreenForce Player V0.99
Replies: 35
Views: 39454

Re: GreenForce Player V0.99

Hello,
will it display rtsp-streams ?
by europa81
Sun Apr 16, 2017 11:51 am
Forum: General Discussion
Topic: Media Player and support for multicast (RTSP and MMS)
Replies: 6
Views: 4312

Re: Stream

Paul, thank you. Your code works ok... but I'm seeking some form to do that this code works :S

InitMovie()
If OpenWindow(0,0,0,320,240,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"")
LoadMovie(0,"mms://media2.bloomberg.com/btv_gernb.asf")
PlayMovie(0,WindowID(0))
Repeat
Until ...
by europa81
Fri Mar 24, 2017 11:25 pm
Forum: Coding Questions
Topic: RTSB Video Streaming
Replies: 0
Views: 1346

RTSB Video Streaming

I have a WLAN Camera mounted on a copter which is streaming video in VLC with this command:

rtsp://192.168.42.1/live

and I would like to write a PB program which does display the stream as well as having a few buttons to control the camera (shutter etc.).

Any help as to the streaming would be ...
by europa81
Mon Jan 09, 2017 10:36 pm
Forum: Coding Questions
Topic: Send a single Byte to Serial Port
Replies: 2
Views: 1184

Send a single Byte to Serial Port

after opening a serial port I would like to send a single byte over the port and reclose the port.
WriteSerialPortData only allows the use of @buffers. How do I manage a single byte with a defined value ?
Happy New Year
by europa81
Sat Feb 20, 2016 4:32 pm
Forum: Coding Questions
Topic: RS-232 receive data
Replies: 33
Views: 8748

Re: RS-232 receive data

Ok, I figured parts of it:
(1) in PurBasic Bytes are -127 ~ 128. Go figure ! (different in other Basics). Ascii needs to be used.
(2) the Trackbar probably jumps to 88, but that happens so fast that it is not visible.
cheers
<Thomas>
by europa81
Sat Feb 20, 2016 4:16 pm
Forum: Coding Questions
Topic: RS-232 receive data
Replies: 33
Views: 8748

Re: RS-232 receive data

Ok, sorry: RTFM - the "*" stands for pointer. While I still do not understand why the name of an AllocatedMemory should be a pointer instead of a name of the allocated memory. Anyway, I used NewList in order to save the data received. And it works 50 % but there are two reasons why it should not ...
by europa81
Sat Feb 20, 2016 3:01 pm
Forum: Coding Questions
Topic: RS-232 receive data
Replies: 33
Views: 8748

Re: RS-232 receive data

Now I am ready to receive a row of binary data which need to be analyzed. As you proposed, it should be done with AllocateMemory. In the programme I write:


*uavdata=AllocateMemory (256)
and the compiler is unhappy with a non-declared variable. My questions:
(1) what does the "*" in front of the ...
by europa81
Thu Feb 18, 2016 8:23 pm
Forum: Coding Questions
Topic: RS-232 receive data
Replies: 33
Views: 8748

Re: RS-232 receive data

Thank you, Bernd. That was clear. Using the timing on the serial channel could make sure when a message starts. Else, one could use a certain start-Byte such as 0xFE and avoid repetition of the following sequence.
My goal is to keep most of the workload on the PC-Side as the AVR has so much less ...
by europa81
Tue Feb 16, 2016 10:25 pm
Forum: Coding Questions
Topic: RS-232 receive data
Replies: 33
Views: 8748

Re: RS-232 receive data

Alright, took another path: installed a RGB-LED on the AVR Board and control the three channels with three TrackBars individually. This code still uses one Byte only to transmit the three values by splitting up the range of 0 ~ 255 into:

Red: 0 ~ 80
Green: 81 ~ 161
Blue: 162 ~ 242

Next task is now ...
by europa81
Mon Feb 15, 2016 10:37 pm
Forum: Coding Questions
Topic: RS-232 receive data
Replies: 33
Views: 8748

Re: RS-232 receive data

Thank you, Bernd !
I trust you that PB is the easiest solution. What I like most is that you can compile such small stand-alone .exe-files.
Your new code works fine and the problem of repositioning and resizing is solved. Probably because you read the entire buffer. I lowered the timer to some crazy ...
by europa81
Sun Feb 14, 2016 7:26 pm
Forum: Coding Questions
Topic: RS-232 receive data
Replies: 33
Views: 8748

Re: RS-232 receive data


buffer_length = available_bytes_in_buffer
for x=0 to buffer_length-1
receive$=receive$+byte(x)
next x


This works also in PB.

buffer_length = AvailableSerialPortInput(0)
For x=1 To buffer_length
ReadSerialPortData(0, @Byte, 1)
receive$ = receive$ + Chr(Byte)
Next x


But when is your data ...
by europa81
Sun Feb 14, 2016 2:43 pm
Forum: Coding Questions
Topic: RS-232 receive data
Replies: 33
Views: 8748

Re: RS-232 receive data

Thanks, will keep hosting elsewhere when need be.

Here now is the code with procedure instead of a subroutine:


#WindowColor=$FAFAFA

Procedure rs232()
b.l=AvailableSerialPortInput(0)
If ReadSerialPortData(0,@Puffer,b)
p$=Str(puffer)
SetGadgetState (2,Puffer)
EndIf
EndProcedure

Define flags ...
by europa81
Sun Feb 14, 2016 2:10 pm
Forum: Coding Questions
Topic: RS-232 receive data
Replies: 33
Views: 8748

Re: RS-232 receive data

here is the Bascom-code for completeness sake:


$regfile = "m2560def.dat"
$framesize = 32
$swstack = 32
$hwstack = 32
$crystal = 16000000
$baud = 1200
Dim X As Byte
Dim Y As Byte
Do
For X = 0 To 100
Printbin X;
Waitms 100
Next X
For X = 100 To 0 Step -2
Printbin X
Waitms 40
Next X
For X = 0 To 40 ...
by europa81
Sun Feb 14, 2016 1:54 pm
Forum: Coding Questions
Topic: RS-232 receive data
Replies: 33
Views: 8748

Re: RS-232 receive data

Have been doing some more work on the programme - at my limited intellectual level and am proud to have a moving bar alongside a working programme:


#WindowColor=$FAFAFA

Define flags = #PB_Window_ScreenCentered|#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window ...
by europa81
Sun Feb 14, 2016 12:58 pm
Forum: Coding Questions
Topic: RS-232 receive data
Replies: 33
Views: 8748

Re: RS-232 receive data

A Thread example:


Bernd

Bernd, Guten Morgen !
and thank you. I am still working on that thread part, but one question which is bugging me since: how does the @byte know which position within the receive-buffer is the actual one ? I would expect something like:

buffer_length = available_bytes ...