Shop OBEX P1 Docs P2 Docs Learn Events
Propeller2Explorer — Parallax Forums

Propeller2Explorer

rjo__rjo__ Posts: 2,114
edited 2016-01-14 02:33 in Propeller 2
Propeller2Explorer (very much a work in progress)

Many thanks to our forum experts.

Description: Windows based application stub to support study of the P2/P2v.
Interface created using Processing 3(64bit). P2 interface uses P2Host.spin
License: free for any use, without attribution.

Current Capabilities

Communications... 1 serial line between P2 and P2Explorer, BAUD rates up to 1,225,000.
...at startup, serial communications is not set up. Start P2Host.spin first, then
... configure Propeller2Explorer

External Connections for P2Explorer
1. Kinect V2
Click screen button KINECTV2 to start
Transfer of 8bit depth map (320x240) to P2 ~ 1.5fps
Transfer of (320x240)16bit raw depth data and 8bit gray scale image to P2 ~2sec
This requires Danial Shiffman's library shiffman.net/p5/kinect/
which in turn requires a different driver, which in turn requires 64bit Windows 8.1 or 10, haven't tried 7.
2. USB camera
Transfer rate between USB camera and P2v (320x240 gray) ~1.5fps.
Right now, the program stalls if a camera is not present.
External Connections for P2v
1. Digital Camera... works but limited to OV9655 @~1fps until smart pins are done

P2Explorer Utility Functions

1. On Screen Console for listing of P2 instruction set and general housekeeping.
... P2Explorer expects a text file, named "instructionsv6.txt" in its current directory
... to change this change line #148 of Propeller2Explorer
2. 512 long buffer with graphical interface to show contents of LUT, COG or HUB RAM.
3. Click screen button to Export Kinect data as 24bit color .ply file.
4. keyboard functions
a ... acquire continuously from digital camera (ov9655) and display video
b ... tell P2 to transfer off-screen buffer to screen and display.
... note that once a Kinect data set is transferred, the offscreen buffer is overwritte
...until then you should see a stock foto of our favorite genius:)
c ... transfer cog contents to lut
d ... transfer Kinect 8bit depth map to P2 and display on video
h ... presents dialog asking for hub address and then tells P2 to transfer 512 longs
...beginning at that address to lut beginning at lut address #0. To view results press "r"
...For some reason hidden in the depths of Processing 3, the first time this is called, the
...dialog shows up behind the main window. After that, it is ok.
i ... transfer usb camera to P2 and display video
k ... transfer Kinect 8bit gray image and 16 bit depth data to P2 and display gray image

r ... read lut from P2 and transfer to LUT array in P2Explorer
... contents viewable at bottom of screen using scroll bar.
s ... retrieves a cog object file, sends that file to P2. The P2 then loads the file into the Hub
... and starts the cog. Right now, you have to edit line #983 in Propeller2Explorer to establish
... the location and name of the cog object:
... String path = "C:/Users/Public/p2/all_cogs_blinkexp.obj";
t ... transform kinect data and display (not done)

comments... very messy. I'll clean it up later;)
... I inadvertently commented out my P2 button function. If you uncomment the 5 lines at the beginning of loop1
then by pushing button PB0, the P2 will request an image from the USB camera and display it in the video
1387 x 1030 - 207K

Comments

Sign In or Register to comment.