-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FT_W32_WriteFile ? #9
Comments
I'm coming to this issue because I am experiencing strange behavior with my device. The code below I would expect to light up the first 4 DMX channels, but I'm actually seeing every-other channel lit up. It may be a parity issue, but from what I can tell, a parity of var ftdi = require('ftdi');
var settings = {
'baudrate': 115200 / 2,
'databits': 8,
'stopbits': 2,
'parity' : 'none',
};
var sleepTime = 20;
var device;
var universe = new Buffer([
0,
250,
250,
250,
250,
], 'hex');
function writeLoop(){
device.write(universe);
setTimeout(function(){
writeLoop();
}, sleepTime);
}
ftdi.find(function(err, devices){
console.log(devices);
device = new ftdi.FtdiDevice(devices[0]);
device.on('data', function(d){ console.log(d); });
device.on('error', function(e){ console.log(e); });
device.on('open', function(){ console.log('opened'); });
device.open(settings, function(){
writeLoop();
});
}); |
Sorry, node-ftdi does not support the old Win32 api. I would recommend to try it in c++ with the new api first and then to come back to js (node-ftdi). |
I don't think the new API works sadly. It's old cheap hardware :D Thanks for looking at it! |
Probably
Probably way too late, but first issue I can spot is DMX baud rate is 250000. |
Regarding FT_W32_SetCommBreak, for all I know it's a wrapper around Win32 SetCommBreak function. So in Win32, you could use either. |
I have this old C++ Code which I am trying bring over to JS:
This code is to talk to a DMX lighting controller, which simply does:
0
)What would the equivalent methods to
FT_W32_SetCommBreak
andFT_W32_ClearCommBreak
be in this library? Are they handled for you by thewrite
method?The whole example C++ lib can be found here http://www.enttec.com/index.php?main_menu=Products&pn=70303
The text was updated successfully, but these errors were encountered: