Go to advanced search

by Lomax
Sun May 16, 2021 11:07 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Mysterious issue with serial adapter on /dev/ttyUSB2
Replies: 7
Views: 456

Re: Mysterious issue with serial adapter on /dev/ttyUSB2

Thanks guys. Without hooking up a scope it seems hard to diagnose this further; when I send known valid requests to the device the response just times out. The exact same code works fine when I move the USB cable to my laptop, without changing anything . I know I have the right device name, but neve...
by Lomax
Sun May 16, 2021 9:23 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Mysterious issue with serial adapter on /dev/ttyUSB2
Replies: 7
Views: 456

Re: Mysterious issue with serial adapter on /dev/ttyUSB2

Thanks, that makes sense. But now I'm back to square one, with no idea what causes this communication problem.
by Lomax
Sun May 16, 2021 3:02 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Mysterious issue with serial adapter on /dev/ttyUSB2
Replies: 7
Views: 456

Re: Mysterious issue with serial adapter on /dev/ttyUSB2

Interestingly, when I connect the FTDI adapter to my laptop, dmesg shows this: [451538.930020] usb 1-1.2: new full-speed USB device number 16 using ehci-pci [451539.046027] usb 1-1.2: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00 [451539.046033] usb 1-1.2: New USB device strin...
by Lomax
Sun May 16, 2021 2:43 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Mysterious issue with serial adapter on /dev/ttyUSB2
Replies: 7
Views: 456

Re: Mysterious issue with serial adapter on /dev/ttyUSB2

A reboot did not help, though it did change the naming order of the ports, with the new adapter now showing up as /dev/ttyUSB0. After updating Node-RED accordingly the requests still time out as before. Modbus communication on /dev/ttyUSB2 continues to function. $ dmesg | grep usb [ 3.824409] usb 1-...
by Lomax
Sun May 16, 2021 1:03 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Mysterious issue with serial adapter on /dev/ttyUSB2
Replies: 7
Views: 456

Mysterious issue with serial adapter on /dev/ttyUSB2

Hello, I've got a device which I talk to over RS232 from Node-RED, using an FTDI USB <> serial adapter. When connected to my laptop (running Devuan Beowulf) I can talk to the device without issues, and I have developed a bunch of Node-RED flows making use of this data. Once I deploy these flows to t...
by Lomax
Fri Aug 07, 2020 9:57 am
Forum: Off topic discussion
Topic: What to do with left-over Oculus Rift controllers & sensors?
Replies: 2
Views: 611

Re: What to do with left-over Oculus Rift controllers & sensors?

proprietary Aha. That fits well with my impression of Oculus - especially post facebook buy-out. They make it very difficult to use their hardware without their software (and their T&Cs), which wasn't appropriate in my application. It took a lot of effort just to get the headset to display an i...
by Lomax
Thu Aug 06, 2020 11:45 pm
Forum: Off topic discussion
Topic: What to do with left-over Oculus Rift controllers & sensors?
Replies: 2
Views: 611

What to do with left-over Oculus Rift controllers & sensors?

I recently completed a project that made use of a Rift CV1 headset, and now have the two hand controllers and two infrared cameras left over. Can I do anything interesting with them, or should I just sell them? All examples I've found online are for applications which require the headset, and it's h...
by Lomax
Wed Aug 05, 2020 11:26 am
Forum: General discussion
Topic: IVPort Dual camera multiplexer
Replies: 27
Views: 8238

Re: IVPort Dual camera multiplexer

It looks near identical in design to the IVPort one, so almost certainly yes. Ouch. Thanks for the analysis though! Someone should design a camera mux for the Pi which doesn't suffer from this issue... I could live with a switching time of several frames, as long as the interface is otherwise stabl...
by Lomax
Sat Aug 01, 2020 9:49 am
Forum: General discussion
Topic: IVPort Dual camera multiplexer
Replies: 27
Views: 8238

Re: IVPort Dual camera multiplexer

They have a horrid kludge with the I2C that bridges i2c-0 (controlled by the GPU, pins 13&14 from the camera connector), and i2c-1 (controlled from Linux, GPIO header pins 3&5). The I2C controllers don't support multiple masters, so you have a moderate probability for collisions should both...
by Lomax
Thu Jul 23, 2020 12:27 am
Forum: Troubleshooting
Topic: One of five GPIO inputs stopped working after reboot
Replies: 0
Views: 152

One of five GPIO inputs stopped working after reboot

I just had a strange thing happen; on a Pi3A which (among other things) has five pushbuttons connected to its GPIOs I found one button not working after a reboot. Suspecting a connection problem I opened the box it resides in and checked the wiring but found no issues. Directly shorting the affected...
by Lomax
Fri Jul 17, 2020 11:58 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C and 5V - Definitive answer?
Replies: 29
Views: 14701

Re: I2C and 5V - Definitive answer?

Here is my (perhaps obvious) solution for I2C communication between the Pi and 5 V powered chips: Since the Pi has its own internal pull-ups on the I2C data lines you can simply remove the pull-ups on your breakout board. removed_pullups.jpg Here I have removed the two 10k pull-up resistors on an Ad...
by Lomax
Mon Feb 03, 2020 1:07 pm
Forum: General discussion
Topic: Looking for 2x20 LED matrix display
Replies: 28
Views: 4428

Re: Looking for 2x20 LED matrix display

Is it this character? character3.jpg Thank you, that's seems likely - it even follows some other currency symbols in the table. Also explains why I thought it looked familiar, and why I was unable to find it in the Unicode space (in virtually every case it is shown as "Pts", not "Pt&...
by Lomax
Sun Feb 02, 2020 11:18 pm
Forum: General discussion
Topic: Looking for 2x20 LED matrix display
Replies: 28
Views: 4428

Re: Looking for 2x20 LED matrix display

Decoding the extended characters confirmed they were sequential, with an offset of 32 (decimal), so the full list of extended characters can be translated like this : def extended(s): chars = ["Ç","ü","é","â","ä","à","å","ç&q...
by Lomax
Sun Feb 02, 2020 4:35 pm
Forum: General discussion
Topic: Looking for 2x20 LED matrix display
Replies: 28
Views: 4428

Re: Looking for 2x20 LED matrix display

Or, even better, create a dictionary ... extended = { } extended[ "å" ] = chr(0x08)+chr(0x26) extended[ "ä" ] = chr(0x08)+chr(0x24) extended[ "ö" ] = chr(0x08)+chr(0x34) etc for key in extended: s = s.replace(key, extended[key]) Great, many thanks! My version: def exte...
by Lomax
Sun Feb 02, 2020 2:14 pm
Forum: General discussion
Topic: Looking for 2x20 LED matrix display
Replies: 28
Views: 4428

Re: Looking for 2x20 LED matrix display

One small problem remains; I need to send some extended ASCII characters, such as "åäö". This works in the InView software, but I don't understand how they're encoded. If I send them raw the display shows "C%C$C6", and if I monitor what the InView app sends it looks like this: tx...
by Lomax
Sun Feb 02, 2020 4:57 am
Forum: General discussion
Topic: Looking for 2x20 LED matrix display
Replies: 28
Views: 4428

Re: Looking for 2x20 LED matrix display

Bingo. I think you're in the home stretch. Indeed! It's been an interesting battle - and one I could not have won without your kind help. Many thanks! After a bit more trial & error, careful re-reading of the manual, and comparing the strings my code generates with what's sent by the InView app...
by Lomax
Sat Feb 01, 2020 3:25 pm
Forum: General discussion
Topic: Looking for 2x20 LED matrix display
Replies: 28
Views: 4428

Re: Looking for 2x20 LED matrix display

Using Serial Port Monitor I've been able to capture this output, when setting message #001 to "Hello": :01010064.Z01.A0001.0b..0.3.1Hello... 3a 30 31 30 31 30 30 36 34 01 5a 30 31 02 41 30 30 30 31 1b 30 62 16 1e 30 1a 33 1c 31 48 65 6c 6c 6f 04 0d 0a The string is a little different, usin...
by Lomax
Sat Feb 01, 2020 2:24 pm
Forum: General discussion
Topic: Looking for 2x20 LED matrix display
Replies: 28
Views: 4428

Re: Looking for 2x20 LED matrix display

Stop the press - there's been a break through! testing_testing.jpg I spent some more time digging around for the official software, and after finding a list of version numbers I had success with a search for "InView 2.6" - which was available to download from Software Informer . Installing...
by Lomax
Fri Jan 31, 2020 4:41 pm
Forum: General discussion
Topic: Looking for 2x20 LED matrix display
Replies: 28
Views: 4428

Re: Looking for 2x20 LED matrix display

This seems to work for me, Python 2 ... Thanks muchly! I tried a few things such as: #!/usr/bin/env python3 # encoding: utf-8 from time import sleep import serial, base64 display = serial.Serial("/dev/ttyUSB1", 9600, 7, serial.PARITY_EVEN, 2) def Hex(n,w): s = hex(n)[2:].upper() if len(s)...
by Lomax
Fri Jan 31, 2020 11:29 am
Forum: General discussion
Topic: Looking for 2x20 LED matrix display
Replies: 28
Views: 4428

Re: Looking for 2x20 LED matrix display

This sends the ASCII payload "^AZ00^BA2001 Hello^D" I am not sure it does. That looks more like an incrementing set of 16-bit values as 4-digit hex to me. May be a bug / diagnostics in your message forming code. I'd be expecting ": ... 5E415A30305E4241323030312048656C6C6F5E44 ... \r\...
by Lomax
Wed Jan 29, 2020 10:26 pm
Forum: General discussion
Topic: Looking for 2x20 LED matrix display
Replies: 28
Views: 4428

Re: Looking for 2x20 LED matrix display

I would assume ... : = start of message 01 = dunno 06 = your 6 00 = your 0 66 = your 102 007B = your 123 18 = checksum \r\n = CR-LF I am deeply impressed - you are indeed correct! The "dunno" is the unit's Modbus address. The following 06 is the function code, 00 high register address, 66...
by Lomax
Wed Jan 29, 2020 9:06 pm
Forum: General discussion
Topic: Looking for 2x20 LED matrix display
Replies: 28
Views: 4428

Re: Looking for 2x20 LED matrix display

Some further progress, I can now clear the message cue (I think), and tell it to display a specific message #: initialised.png #!/usr/bin/env python3 # encoding: utf-8 from time import sleep import minimalmodbus display = minimalmodbus.Instrument("/dev/ttyUSB1", 1, minimalmodbus.MODE_ASCII...
by Lomax
Wed Jan 29, 2020 12:51 pm
Forum: General discussion
Topic: Looking for 2x20 LED matrix display
Replies: 28
Views: 4428

Re: Looking for 2x20 LED matrix display

Some progress: #!/usr/bin/env python3 # encoding: utf-8 import minimalmodbus display = minimalmodbus.Instrument("/dev/ttyUSB1", 1, minimalmodbus.MODE_ASCII) display.serial.baudrate = 9600 print(display.read_registers(1,2)) Gives the response: [0, 0] Which is the expected result.
by Lomax
Wed Jan 29, 2020 10:45 am
Forum: General discussion
Topic: Looking for 2x20 LED matrix display
Replies: 28
Views: 4428

Re: Looking for 2x20 LED matrix display

see http://www.simplymodbus.ca/ASCII.htm Ah, thank you, that clears things up. So in short, Modbus ASCII is always 7 bit, and has a parity bit: In Modbus RTU each byte is sent as a string of 8 binary characters framed with a start bit, and a stop bit, making each byte 10 bits. In Modbus ASCII, the ...
by Lomax
Tue Jan 28, 2020 8:18 pm
Forum: General discussion
Topic: Looking for 2x20 LED matrix display
Replies: 28
Views: 4428

Re: Looking for 2x20 LED matrix display

Unfortunately I know nothing of modbus. I don't know if 9600 would be the appropriate baud rates but I would have thought 8 data bits ( display.serial.bytesize = 8 ) might be worth trying and I would start with a simpler message; msg = "TEST^D" I've used Modbus a few times, but find the m...

Go to advanced search