comp.lang.ada
 help / color / mirror / Atom feed
* Hello, and help with GNAT and Windows USB programming
@ 2014-02-09 19:59 Gumpy
  2014-02-09 20:29 ` sbelmont700
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Gumpy @ 2014-02-09 19:59 UTC (permalink / raw)


First, hello. I'm new here. Forgive me if I'm unfamiliar with this and guide me. 

Next, I've been an embedded software engineer for 25+ years, with 18+ in Ada, though I have not worked with Ada for nearly a decade. Pretty much all of my career has been embedded real-time applications, so I've had very little experience with the PC environment, other than from a user perspective. 

I'm also an up and coming potter. It's a hobby I intend to use to help support my retirement some day. 

I have decided that in order to get myself back into Ada and also learn something about programming in the PC environment that I am going to build a kiln controller to convert my manual electric pottery kiln to a fully automatic 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 that suits my needs and is expandable as I see fit. I can define custom firing 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 board to this, and the control software will tie it all together. 

I've never worked in programming a PC environment, and have no experience with 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 respond. 

1. When your laptop has several ports, how do you know or find out which port a device has been plugged into? Ultimately, I will need a couple ports for the thermocouple interface and the relay board. 

2. Using GNAT, and potentially GNAT.Serial_Communications, how does one open a USB port and read and write character strings to it (the thermocouple interface has a simple character based command language for setup and taking temperature readings). 

3. Does anyone have any specific code examples for communicating on a USB port that they would like to share, or a link to some example(s) online somewhere? 

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 decade of non-use, and so I'm just a bit overwhelmed trying to get up and running. 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.Serial_Communications. That's about it so far. 

Any help that along these lines, including code snippets would be greatly appreciated. 

Craig


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-02-19 17:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-09 19:59 Hello, and help with GNAT and Windows USB programming Gumpy
2014-02-09 20:29 ` sbelmont700
2014-02-09 21:00 ` björn lundin
2014-02-09 22:18   ` Gumpy
2014-02-09 23:37     ` Dennis Lee Bieber
2014-02-09 23:26 ` Dennis Lee Bieber
2014-02-10  9:01 ` Dmitry A. Kazakov
2014-02-12  6:21 ` Per Sandberg
2014-02-19 17:54   ` Gumpy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox