From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.52.37.33 with SMTP id v1mr9265929vdj.1.1391975982428; Sun, 09 Feb 2014 11:59:42 -0800 (PST) X-Received: by 10.182.240.105 with SMTP id vz9mr92318obc.8.1391975982159; Sun, 09 Feb 2014 11:59:42 -0800 (PST) Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!f11no14123218qae.1!news-out.google.com!vg8ni20igb.0!nntp.google.com!c10no12894734igq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 9 Feb 2014 11:59:41 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=74.5.82.164; posting-account=gaNDvQoAAABt5gLhoHxlPNd-DAQzt_m3 NNTP-Posting-Host: 74.5.82.164 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Hello, and help with GNAT and Windows USB programming From: Gumpy Injection-Date: Sun, 09 Feb 2014 19:59:42 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 3901 Xref: number.nntp.dca.giganews.com comp.lang.ada:184737 Date: 2014-02-09T11:59:41-08:00 List-Id: First, hello. I'm new here. Forgive me if I'm unfamiliar with this and guid= e me.=20 Next, I've been an embedded software engineer for 25+ years, with 18+ in Ad= a, though I have not worked with Ada for nearly a decade. Pretty much all o= f my career has been embedded real-time applications, so I've had very litt= le experience with the PC environment, other than from a user perspective.= =20 I'm also an up and coming potter. It's a hobby I intend to use to help supp= ort my retirement some day.=20 I have decided that in order to get myself back into Ada and also learn som= ething about programming in the PC environment that I am going to build a k= iln controller to convert my manual electric pottery kiln to a fully automa= tic kiln. I know I could buy an add-on controller for a few hundred dollars= , but what's the challenge in that? I figure I can build a simple system th= at suits my needs and is expandable as I see fit. I can define custom firin= g schedules that other systems don't accommodate. Ultimately, I may set it = up to control multiple kilns. So, to start with, I found a USB based thermocouple interface that will be = used to sense the temperature inside the kiln. I'll add a USB based relay b= oard to this, and the control software will tie it all together.=20 I've never worked in programming a PC environment, and have no experience w= ith programming USB ports. I'm not finding a lot of information online, but= did find some past messages in this forum which alluded to Linux USB stuff= . I thought I'd put out a request for some help and see if anyone will resp= ond.=20 1. When your laptop has several ports, how do you know or find out which po= rt a device has been plugged into? Ultimately, I will need a couple ports f= or the thermocouple interface and the relay board.=20 2. Using GNAT, and potentially GNAT.Serial_Communications, how does one ope= n a USB port and read and write character strings to it (the thermocouple i= nterface has a simple character based command language for setup and taking= temperature readings).=20 3. Does anyone have any specific code examples for communicating on a USB p= ort that they would like to share, or a link to some example(s) online some= where?=20 I'm sure this probably is easier than I'm making it out, but I'm realizing = I've forgotten (archived) a good deal of my Ada knowledge in the past decad= e of non-use, and so I'm just a bit overwhelmed trying to get up and runnin= g. I have the TDC-GCC-64 compilation system installed on my Vista laptop, = and have it functional. My Hello World is working and I have found GNAT.Ser= ial_Communications. That's about it so far.=20 Any help that along these lines, including code snippets would be greatly a= ppreciated.=20 Craig