Questions?

All about Sub-20 Multi Interface USB Adapter USB to I2C, SPI, GPIO, RS232, RS485, Ir, LCD

Moderator: serg

Post Reply
sparky
Posts: 3
Joined: Tue Jan 12, 2010 6:47 am

Questions?

Post by sparky »

So I am thinking about purchasing a SUB-20, but would like to know how to make it work before I buy one.

First of all, some background info. I am an "expert" at computers, compared to the normal user. If I can get the info, i'll learn.

I want to use this product in Ubuntu 9.10, and would like to be able to read from the GPIO's for an alarm system, so I can read from the inputs to see when a switch is closed, and to output for an alarm, so when the inputs are triggered, it can set off a siren. Also, I know 'about' PWM, but not much about it. This is what i would need to make a blinking LED array (strobe?)

I assume this would be pretty easy for a "guru"?

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: Questions?

Post by xol »

Hi Sparky
sparky wrote:So I am thinking about purchasing a SUB-20, but would like to know how to make it work before I buy one.

First of all, some background info. I am an "expert" at computers, compared to the normal user. If I can get the info, i'll learn.
You can download, install and build Linux package. Compilation can be done without physical connection of the SUB-20 board.
sparky wrote: I want to use this product in Ubuntu 9.10, and would like to be able to read from the GPIO's for an alarm system, so I can read from the inputs to see when a switch is closed, and to output for an alarm, so when the inputs are triggered, it can set off a siren. Also, I know 'about' PWM, but not much about it. This is what i would need to make a blinking LED array (strobe?)

I assume this would be pretty easy for a "guru"?
All this can be done. You can start coding before you get board. But I do not think it is very efficient.
You will need following API functions:
GPIO: http://www.xdimax.com/sub20/doc/HTML/gpio_functions.htm
PWM: http://www.xdimax.com/sub20/doc/HTML/pwm.htm
Linux package contains sub_app sample application that use all required API calls. You can get a reference where.

sparky
Posts: 3
Joined: Tue Jan 12, 2010 6:47 am

Re: Questions?

Post by sparky »

ok, so i figured i could do it, but how. i write a program in C with these functions, then compile? or can i run from a shell for testing purposes?

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: Questions?

Post by xol »

Hi,
I don't quite get your question. How what?
Yes you write program in C and compile it. Just like any other program in C.
Sure you can not read inputs or generate PWM's without real board it's obvious I assume.

sparky
Posts: 3
Joined: Tue Jan 12, 2010 6:47 am

Re: Questions?

Post by sparky »

The ability to run a C command from the linux shell.

But thank you! that was the information I needed, and with a very quick response!

Post Reply