PixelTeleporter - virtual LEDs on your computer

Interesting. Compiling with Arduino IDE version 1.8.13 I don’t get these warnings at all. Structure packing problems would definitely break things. Be sure you’ve got the latest pbxTeleporter.ino from the 1.1.1 release (in pbxTeleporterServers.zip), and see if you still get the errors.

I do recall there was a relatively recent change in the syntax of attribute((packed)) in the Arduino IDE flavor of C++ vs gcc – if you’re using PlatformIO or something like it, you may have to switch to the new syntax, which uses
__attribute__((packed)) objectName
instead of
objectName __attribute__((packed))
which works in the Arduino IDE.

If this is what’s causing the problem, I’ll add figuring out what makes both environments happy with the same code to my list of things for the next build.

Just tested – the compiler warnings don’t affect operation. You can safely ignore them, or if you want, you can get a slightly newer version that doesn’t generate them here. Just copy the code and paste it into your IDE.

Since you got the Processing example to work, I think your setup is correct – you don’t need to reinstall anything.

A few more configuration basics. You’ve probably already done this, but it never hurts to ask.

On the processing side, make sure the server IP address in your example script is correctly set to the IP address of your ESP8266 (not the Pixelblaze). It’s at about line 49 in the script.

You can get the proper address either from your router or DNS server, or by watching the Arduino IDE’s serial monitor when the ESP is starting up. It will display a row of dots while it’s trying to connect to Wifi, and the IP address and port information once connected.

Non-essential, but helpful for future versions – in the Arduino IDE’s Tools menu, check your board settings. Set “CPU Frequency” to 160Mhz, and “IwIP Variant” to “v2 Higher Bandwidth”.

Right on!! With the new ESP server code everything is working as it should.
I also adjusted the CPU frequency and IwIP Varient as you suggested. Otherwise, I had followed your instructions that were laid out in their respective documents and it was only after changing to your new code and adjusting board settings that suddenly everything came to light! Thank you for you time and happy holidays :slight_smile:

1 Like

Thanks for sticking with it 'till we got it solved. Always glad to help - the whole fun of building a tool is seeing it in use!

Sorry it took nearly four months, but my APA102 receive code for ESP32 is now cleaned up and published. It’s working with the Pixelblaze at 4MHz (fastest working option in the dropdown), and with Teensy 4 at 5.5MHz.

It shouldn’t be too hard to extract out the I2sIn and APA102 parsing code for your application and leave the rest. Hope it helps you!

2 Likes

Very nifty. The video of driving a hub75 display using a Pixelblaze v3 (and your engine board) is cool as found here

This is terrific – thank you very much! @scruffynerf is right on – your board is super cool! I’ll definitely send people who want to driver bigger & faster displays your way. If there’s anything in the way of software I can contribute to on your project, just ask!

You actually caught me the perfect time. I’d put direct APA/WS2812 support aside for a while because work was doing its usual end-of-year crazy thing. I’m really looking forward to digging in to this. I’m using the Espressif SDKs, and will try a backport to ESP8266 as well. I’ll post as soon as I get it running. Lots of fun, hopefully useful changes coming to Pixelteleporter in the next few months!

It took a bit of futzing, but I got a Pixelteleporter running. Thanks, @zranger1.

Glad to hear you got it working, @spazzle! When you get time, can you tell me what things slowed you down or made it harder than necessary? I’ve clearly got work on setup and usability to do. It’d help a lot to know where the pain points are.

Right now I’m working the three D’s: Device detection, Diagnostics, and Documentation, particularly on the server side.

On the client side, there are lots of new things coming – the Processing client will soon be joined by others. I’m looking first at building plugins for existing CAD systems, starting with FreeCAD and Blender. If anybody’s got a favorite CAD or design program that supports plugins and has a more-or-less real-time rendering option, let me know, and I’ll add it to the list.

This might be a bit nitpicky.

I used the FTDI connector listed above and windows 10

  1. The directions say that the FTDI USB->Serial adapter would auto install on windows. This was not the case, I had to manually download and install drivers for both hardware components.

  2. the pbXTeleporter server settings operation is unclear. The FTDI USB->Serial adapter shows up as com5 on my system. When you click on the serial device tab it only shows the first com port. It took a while to see that you can mouse click on the port, and then arrow down the side arrows, which are very small. When I selected com5 and hit the “OK” button, nothing obviously happened, whereas the “OK” button in the Settings>Ports pulldown closes the popup. I did see eventually that it had saved it in the ini file.

  3. Sometimes pbXTeleporter just crashes. No idea why. Its infrequent enough that I can make good progress, but still slows things down.

  4. pbXTeleporter has no feedback on windows 10, so I don’t know if (a) Its connected successfully to the adapter, if (b) It is receiving data from the adapter, or if © it is connected to Processing. The only way to know is if you are fully successful and see pixel animation in processing.

  5. The processing window locks sometimes.

The fix for the serial port dialog not closing is already done and will definitely be in. I’ll get it to drop down the entire port list so you can see more of what’s going on too.

Better instrumentation and feedback is also coming. The original idea was that these things would be daemons/services that users would never have to look at, but I think some status information is necessary, especially while getting things set up the first time.

The FTDI driver thing is weird. I’m sure that Windows was able to find a WHQL certified driver in Microsoft’s driver repository. In Device Manager, mine is “USB Serial Converter”, v2.12.28.0, dated 8/16/17.

On locking & crashing: Can I ask what kind of hardware you’re using? Probably the relevant things are laptop vs. desktop, CPU, GPU and amount of RAM. It’ll give me a place to start looking. I’m running an older I7 desktop w/32gig RAM and an Nvidia 1080 and I’ve never had either Processing or pbxTeleporter crash – of course, “it works on my machine”, is the sad and often not-quite-correct lament of developers everywhere!

Thanks for the feedback! It always helps.

Well, Processing isn’t crashing, but the rendering window becomes nonresponsive and doesn’t move on mouse input. I’m able to stop the window and restart it just fine. I’m running a dell desktop with the following hardware.

image

image

Nice setup! Definitely more than fast enough. Is that USB3.0 5k device one of Dell’s new Thunderbolt docks?

Here are a couple of things that have caused me trouble when using “unusual” USB devices like Kinect, Oculus Rift sensors, etc. Not guaranteed to affect anything, but it’s worth a quick check.

First, power management. With the FTDI board plugged in, go to its entry in Device Manager (“USB Serial Converter”) and check in the Power Management tab that “Allow the computer to turn this device off to save power” is disabled.

Windows is sometimes clueless about when a USB device is or isn’t active – I fought constantly with magically disappearing Oculus sensors 'till I figured this out. Doh! While you’re at it (if you’re not actually worried about power use), might as well turn it off on the USB root hubs in Device Manager too.

The other thing that might help is to move the FTDI board to a different USB controller. It should be one that’s not being used for other high bandwidth things like cameras, mass storage, driving displays and such. USB 2 is actually fine for this purpose. Absolute port speed isn’t the limiting factor – it’s more about avoiding transfer bottlenecks in other parts of the system.

If you want or need to, you can use the Performance Monitor snap-in in Windows management tools to see how your USB controllers are loaded. (right click computer, select Manage, then run Performance->Monitoring Tools->Performance monitor, add the devices and performance counters you’re interested in, and go!)

And just in case Processing is somehow trying to use embedded graphics instead of your 2070, run the short diagnostic sketch below - it’ll tell you the name and GPU name and driver version of the hardware it’s using.

Processing sketch to report GPU info:

void setup() {
    size(100, 100, P3D);
    PGraphicsOpenGL pg = (PGraphicsOpenGL)g;
    println(pg.OPENGL_VENDOR);
    println(pg.OPENGL_RENDERER);
    println(pg.OPENGL_VERSION);
    println(pg.GLSL_VERSION);
}
void draw() {
  ;
}

Oh, and don’t worry about any of this if you don’t have time or don’t feel like it. I could go on troubleshooting and debugging for days, long past the point when it’s actually a good idea – just me being vexed when my wonderous inventions don’t behave as they’re supposed to.

2 Likes

Got this working on Windows 10. Very cool, and thank you!

2 Likes

I saw this after i had an idea for a 3d led cube with PB. I saw cylinder , cube and sphere on your video…so its possible a led cube like auracube kit or other similar kit to work with PB? Or needed to cut a led strip smds one by one and make strips conected zigzag 8x8x8 but then programing this will be difficult to play patterns like a cube… or let it act like simple zigzag strip…

This is amazing! My collaborator and I are both getting stuck at a single red pixel after we do the following:

  1. Wire up the Com board as described above, and plug it in
  2. Fire up the latest PixelTeleporter Server for Windows
  3. Set the pixelblaze to “Output Expander”
  4. Load any of the examples from Processing with the “127.0.0.1:8082” modification you can see in the video below:
    https://www.youtube.com/watch?v=zatGpibALPM&ab_channel=JoeGood

In the long term, we’re hoping this will be a good solution for large-scale projects which use an array of PixelBlazes. Please let me know if I can provide any clarification.

1 Like

Hi!,
Thanks for the very helpful video. I think you’ve almost got it – a couple of things jump out.

  • First, if you’re using ports 8081 and 8082, you actually don’t need to specify the port number at all in the PixelTeleporter constructor. This ought to work.
    new PixelTeleporter(this,"127.0.0.1")
    If you do specify the port number, it’s best to specify both ports, like this:
    new PixelTeleporter(this,"127.0.0.1",8081,8082)
    (incoming port first, followed by outgoing data port)
  • In the Output Expander Settings on the Pixelblaze Settings page, you’ll need to set the color order for each channel you’re using to ‘RGB’. I see that you set it in the main settings, but the expansion board lets you set order per channel, and the Processing client only speaks RGB.

Let me know if this gets your setup working. You’ve also convinced me to post the latest version (1.1.2) a few days earlier than I was planning. Download it when you get the chance, if you like. Among other new features, it has improved diagnostics…

Windows pbxTeleporter 1.1.2 displays its connection status and the number of pixels received in its main Window, and the Processing library now pulses pixels between black and grey to indicate a disconnect.

1 Like

Just updated the repository to PixelTeleporter 1.1.2. This release is mostly about improved usability and quality of life. New features are:

  • You can now translate (pan) objects by right-dragging with the mouse.
  • Object rotation with the mouse is generally smoother and more responsive.
  • Holding down the alt key allows you to rotate your object around the Z axis.
  • added setBackgroundImage() method to Pixelteleporter object. Supported image formats are:
    (.gif, .jpg, .tga, and .png). (Call this from your sketch’s setup() function. If you use setBackgroundImage, you can remove calls to background() from your sketches.)
  • Hold down the shift key while dragging to pan your background image
  • Hold down the shift key with the mouse wheel to zoom your background image
  • Connection status feedback! When not receiving data from the pixelblaze, Pixelteleporter will now pulse slowly between between black and grey. Normal display will resume when the connection is reestablished
  • More connection status feedback! pbxTeleporter for Windows now displays connection status and LED count in its main window.
  • Many other small fixes and improvements
3 Likes

It’s alive! We have more exploration to do, but now the connection is working! Verified on the older version, as well as latest Windows server :slight_smile:

3 Likes