DMX software to control lights with programmable interface - dmx512

I find myself in the need of a software to control lights with a programmable interface. Basically what I want to do is to automatically control the lights using some criteria that I programmed inside a program. My program will then control the lights passing through the software I'm searching for, of course this would need a programmable interface to which I should pass the commands to control the lights.
I've been searching for a software like that in the last couple of days without success, what I found are only softwares with GUIs for users, but no specification whatsoever about programming the light behavior instead of manipulating it by hand.

There's some really good information & code samples (including a working class that I wrote) here: Lighting USB OpenDMX FTD2XX DMXking
Ultimately, you end up setting byte values (between 0 and 255[FF] (brightest) in a byte array.
It's fairly trivial to implement simple effects such as fades or chases.
If you haven't got that far yet (e.g. up to the code) you'll need to get ahold of a USB DMX controller.
There are a number of them out there, but the thread above has sample code for two different flavours.

I also wanted an environment where I could quickly write code that would create interesting effects for my DMX effect lights and lasers, and ended up creating it myself. I just announced the first public release of Afterglow, my free, open-source live-coding environment for light shows. You can find it at https://github.com/brunchboy/afterglow

I needed precise control of individual mutli-channel (RGBAW) DMX512 lights and wanted to write code in C++ for Windows. I adapted the C# example from Enttec's website for OpenUSB and released the code:
https://github.com/chloelle/DMX_CPP

Related

Is there a programmatic way to see what graphics API a game is using?

For games like DOTA 2 which can be run with different graphics API's such as DX9, DX11, Vulkan, I have not been able to come up with a viable solution to checking which of the API's its currently using. I want to do this to correctly inject a dll in order to display images over the game.
I have looked into manually checking what dll's the games have loaded,
this tool for example: https://learn.microsoft.com/en-us/sysinternals/downloads/listdlls
however, in the case of DOTA, it loads in both d3d9.dll and d3d11.dll libraries if none is specified in launch options on steam. Anyone have any other ideas as to how to determine the correct graphics API used?
In Vulkan, a clean way would be to implement a Vulkan Layer doing the overlay. It is slightly cleaner than outright injecting dlls. And it could work on multiple platforms.
In DirectX, screencap software typically does this. Some software adds FPS counter and such overlays. There seems to be open source with similar goals e.g. here: https://github.com/GPUOpen-Tools/OCAT. I believe conventionally the method is to intercept (i.e. "hook" in win32 api terminology) all the appropriate API calls.
As for simple detection, if it calls D3D12CreateDevice then it likely is Direct3D 12. But then again the app could create devices for all the APIs too and proceed not to use them. But I think the API detection is not particularly important for you if you only want to make an overlay; as long as you just intercept all the present calls and draw your stuff on top of it.

Control of shift registers with ESP8266 and MicroPython

I've an issue with my current micropython project on my ESP8266. I've a 10x10 LED matrix which i would like to control via 4 shift registers.
In general 3 pins are required for the controlling DATA, LATCH and CLOCK. After some hours of internet searching the most promising solution was the usage of SPI, where also found some useful instructions for the pyboard (thank you for the code btw):
https://forum.micropython.org/viewtopic.php?t=1219
I tried to replace the pyboard specific librarys with the general machine module for the ESP8266 to get access to the SPI class. It worked fine till a specific point but the main issue at the moment is that it was not capable provide a binary signal at the DATA pin.
To be honest I'm a little bit confused about the write methods in the machine.SPI class. The docu says the return value is None. So in general what is the purpose of a write method with a return value of None (sry for the maybe silly question)
Is there maybe another solution to get a binary signal out of the data pin? I'm not sure anymore if the usage of SPI is the best way to manage the controlling. Do you have some other examples or tutorials to get deeper into the topic?
Thank you for your kind response in advance,
BR charlzo

Microcontroller Programming in Delphi

I've been searching for some information regarding microcontroller programming but the info I find is either way over my head or doesn't appear to exist. I'm looking for something easier to digest! I'm relatively new to programming and come from an SQL DBA background and decided that it would be quicker for me to learn some programming fundamentals and then teach myself Delphi than it would to get some changes implemented through my company's insane design change note system!
After a couple of years of Delphi programming I can cope with writing database applications without too much bother and I want to be able to move on a level.
We use PIC microcontrollers on our PCBs; mainly the PIC18F family. The software on the PICS is written in C but there are parameters values that are written to by a Delphi application that interface with the PIC using an ActiveX control.
Basically, SQL Database holds parameter info, Delphi client app retrieves those values, passes them to the ActiveX controll which does all the low level stuff on the PIC. For example the internal EEPROM will have a map and within any particular address a value will be stored to switch something on or off or hold an integer value etc.
I've gotten hold of an MPLAB kit which has an ICD2 device that can read and write values to the internal EEPROM and I understand how to change these hexadecimal values using MPLAB software.
My hope isn't to learn embedded microcontroller programming; rather that I can write a Delphi app that will do something similar to MPLAB software. E.g read and write values to certain memory addresses within the EEPROM.
I'd be very gratefull if anyone can point me in the right direction of any libraries or components that may already exist for bridging this gap between simple Delphi form application and writing low level PIC EEPROM. I doubt such any easy interface exists but I thought I'd ask. To summarise I want to be able to have a simple form app, with some edit boxes that the user types in or selects from dropdown boxes, parameter values, to click on a button and to assign those parameter values to specific EEPROM memory addresses. Thank you for reading and any comments would be gratefully received.
Regards
KD
I'm a big fan of MikroElectronika and have used their Pascal tools for pic16 series MCU with great success (touch screen interfaces, ZigBee, ...).
http://www.mikroe.com/
Updated 2015 Answer:
Why not a Raspberry Pi with FreePascal and Lazarus? The boards cost from $5 to $25 US, as of this date, and the development tools are free.
Original 2012 Answer:
If you like to use Pascal, you might find Free Pascal useful on small embedded systems, but the minimum I believe you will find it can compile on is a Linux-based ARM embedded system. The fact that you use pascal on both sides is very unlikely to help you accomplish anything major.
If you want to go all the way down the the smallest PIC microcontrollers, you'll find that it's almost always a variant of C that you'll be using. Frankly, at that level, the differences aren't that much. If you can write Pascal, you can learn enough C in a day, to use with microcontrollers.
Don't be scared to use the native language that most microcontrollers support. My personal favorites are the Rabbit microcontrollers, formerly from Z-World, now from digi -- I think I paid about $100 US for the first board and development toolkit.
Interfacing such an application with delphi is pretty easy, usually these days, I would interface using TCP/IP over either wired Ethernet, or wireless (Wifi). But if you really want to you could use RS-232 or RS-485 serial links. (RS-485 has the advantage that you can wire it up to 5 miles long.) If I was using a serial link, I'd probably implement something like Modbus on both sides, if I just wanted to send some numeric data back and forth, and if I was doing something text-oriented, I think I'd write a mini HTTP web server on the embedded controller, and most boards these days come with enough HTTP server demos to make that drop-dead easy.
Delphi outputs Win32 and Win64 native applications you can write software that can interact with certain devices if the PCB has serial comunication or I2C you can write software that in Delphi that it will interact with the physical device.
But if you want to programm the devices yourself , write software that will run on this devices you can't do it in Delphi. I suggest you buy an Arduino it's an excellent envoirment for beginners in microcontroller programming.
If you have the source code of your pic microcontroller then you can implement the code in C to read from Serial, USB or some other interface available in your hardware and write it to the eeprom. This way its easy to write the app in any high level language like delphi, c++, etc.
Or you can write your PIC application using the mikropascal compiler from mikroeletronika that its very good and I've been using for a long time, but as you can see you will have to implement some mecanism to read from the interface and write to your eeprom as I've mentioned before.
This compiler comes with a lote of librarys to work with many devices. You should take a look on it, its not free but the price is low and in their site you can find samples and sample boards to test it.
One option, if you want a simple interface to write to the PIC EEPROM, is to use the ICD command line utility. Unfortunately it is not available for the ICD2, but the PICkit 2 and 3 (which are cheap), ICD3, and RealICE have command line utilities that give you the ability to write to the EEPROM (google pk2cmd). In Delphi, you could just wrap a very simple set of command line calls to pk2cmd.

Reverse engineering and patching a DirectX game?

Background
I am playing Imperishable Night, one of the Touhou series of games. The shoot button is 'z', moving slower is 'shift', and the arrow keys move. Unfortunately for me, using shift-z ghosts my right arrow key, so I can't move to the right while shooting. This ghosting happens in all applications, and switching keyboards fixes it.
Goal
I want to locate in the disassembled code the directx function that gets the keyboard input and compares it against the 'z' key, and change that key to 'a'. I'm considering this a fun project. Assuming the size of the scan codes are the same, this should be fairly simple. And because the executable is only 400k, maybe this will provide a unique opportunity for me to explore the dark side of the computing underworld (kidding).
Relevant experience
I have some experience with coding in assembly, but not in the disassembly of such. I have no experience with the DirectX apis.
Question
I need some guidance. I've found a listing of directx keyboard scan codes, and a program called PEExplorer that looks like it will do what I need.
Is there a means by which I can turn some of the assembly with C function calls so it's more easily read? I will need to locate where the game retrieves the currently pressed keys, compares those against a list, and it's that list I need to modify.
Any input would be greatly appreciated.
You might be interested in the Detours library from Microsoft Research, it allows you to hook function calls and alter their arguments. Doing that your code can change the scan codes of keys that don't ghost into the ones the game expects.

Carmen Robotics

I have been working with Carmen http://carmen.sourceforge.net/ for a while now, and I really like the software but I need to make some changes inside the source code.
I am therefore interesting in some students reports/projects there have been working with Carmen, or any documentation of the source code.
I have been reading the documentation on the webpage for Carmen, but with all respect I think the literature there is a bit outdated and insufficient.
ROS is the new hot navigation toolkit for robotics. It has a professional development group and a very active community. The documentation is okay, but it's the best I've seen for robotic operating systems.
There are a lot of student project teams that are using it.
Check it out at www.ros.org
I'll be more specific on why ROS is awesome...
Built in visualizer/simulator rviz
- It has a record function which will record all of the messages passed out of nodes, this allows you take in a lot of raw data store it in a "ros bag" and then play it back later when you need to test your AI, but want to sit in your bed.
Built in navigation capabilities,
-all you have to do is write the publishers of data for your sensors.
-It has standard messages that you need to fill out so that the stack has enough information.
There is an Extended Kalman Filter which is pretty awesome because I didn't want to write one. Currently implementing it, i'll let you know how that turns out.
It also has built in message levels, by that I mean you can change which severity of print messages are printed during runtime, fairly handy for debugging.
There's a robot monitor node that you can publish the status of your sensors to and it bundles all of that information into a GUI for your viewing pleasure.
There are some basic drivers already written. For example SICK lidars are supported right out of the box.
There is also a built in transform function, to help you move everything to the right coordinate system.
ROS was made to run across multiple computers, but can work on just one.
Data transfer is handled over TCP ports.
I hope that's more helpful.

Resources