I want to avoid using raspberry because it dindt pass basic tests for app that i need to design. Beside, i have to use HDD so PC is better solution.
Anyways, i want to create some electronics that i can use as "GPIO" inputs/outputs but on standard linux based PC.
The idea is to set some serial communication ( over some USB2serial adapter ) or directly if possible.
This device on serial port should read the state of arduino PIN's and that's all. When the state changes java or python based desktop app will set some action ( print/send mail/record picture etc... )
AVR/PIC/ARM/etc. What's your preference? I use RPi just to avoid programing them, even though i know how to do all of them, but it's an extra step to maintain.
I can't help thinking it would easier on a Raspberry pi or one of the many even cheaper unix based Arm evaluation boards that come with plenty of IO pins and a USB driver to let the host PC interact with it.
Otherwise for a one off buy a dongle that does GPIO and comes with a
range depending on features. Don't underestimate the effort in making a DIY USB device driver even if you could make the hardware from scratch.
If you described what you were trying to do it might be possible to suggest a suitable widget that does it more or less out of the box.
Arduino sends impulse when coin acceptor detects correct coin value. PC should print out the bill and take a picture
----------------------------------------- On the other side, barcode scanner should read barcode and if the barcode is correct, program should send trigger to arduino to open the relay.
-----------------------------------------
So, you have two systems in one box. Coin acceptor / barcode scanner / printer / relay.
Arduino is used for triggering relay and reading coin acceptor and PC for all the rest...
----------------------------------------
I have done the same system with raspberry and it has worked OK but it isn't stable. SD card is additional problem. Anyhow, i want to avoid rsp alike systems.
On a sunny day (Mon, 2 Oct 2017 17:18:10 +0200) it happened gm wrote in :
I have a PCI card with PC parport connector, gives you many I/O pins, use it to program PICs, test i2c chips etc.. If you have a free PCI slot that is the simplest way, those cards are cheap. Dunno about java and snakes, just use C ;-)
In an other case (laptop) I use an USB to serial adaptor, and test for the state of DSR (pin 6)in a script. Only 1 pin for input then.
Does an USB harddisk not work on the latest raspberries? Old raspi USB I have is slow shit.
Something like a labjack? I had an idea to make a audrino into a labjack type of thing. It's not difficult, most have the ftdi chip on board which makes it USB to IO. Just open a serial port and send commands to read the ports.
It would be much easier to help if you'd supply some info on how many signals you want to monitor and control. Speeds required? Typical parallel port has more outputs than inputs. Go to ebay and order one of the $2 USB to GPIO devices. Start with the EBAY search term "ESP8266"
You can get the cheapest-nastiest USB keyboard and hack it for simple I/O. The coin acceptor triggers a keypress and the scroll lock LED triggers the camera. Lot of easy O/S calls to change num/caps/scroll lock state exist and of course keyboard input is even easier to read.
On a sunny day (Wed, 4 Oct 2017 21:38:35 +0200) it happened gm wrote in :
1) I have no Duino...
2) The par port on modern PCs outputs about 3.3V. Some pins have high current drive capability. Some pins have reversed logic levels.
3) Here are some examples how I use it,
this controls an ebay frequency synthesizer module:
formatting link
this is a part port PIC programmer (design is not mine, just modified it):
formatting link
Normally the par port I/O address is 0x378 In this simple C file you can see how I interface using i2c:
formatting link
I use diodes to do sda pulldown, sdcl is hard up/down.
In ADF4350_test.c there is a wiring diagram.
I have build many of those test circuits, many are on my site too.
So, take care of the currents that can flow, the logic levels (no idea what a Duino does), and do a web search for PC par port connections and their addresses (control port, and data port).
Write a test routine to toggle and read those pins, use a multimeter or something to check.
Advantage of the PC parport is that you can have very high speed, no unstable USB shit or device renumbering either. No overhead, just read / write to 0x378 0x379, fast C compiler on same PC, unlimited test resources.
IMNSHO a computer without hardware I/O is quite useless really.
To write to the parport you need to be root, see iopl(3) in the C source. To be safe not to smoke your par-port (card?) you could use 330 Ohm resistors in series for a start.
If you are using Bloatsoft Widows, then I have no examples.
True, I've used a USB to serial just for the control I/O's. I didn't need speed, and just needed level translation to toggle a relay and watch an output. worked like a champ.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.