Author Topic: Read ADC value from desktop application  (Read 3949 times)

steffen

  • Newbie
  • *
  • Posts: 2
Read ADC value from desktop application
« on: September 11, 2012, 06:19:29 am »
Hello community,

I have an Arduino based setup that reads an ADC value every 50 msecs and pushes it to a computer. This is done via a java application that listens on a virtual serial interface provided by a FTDI driver.

My question: How can I get this to work with the Digistump?

In other words: How can I use the Digistumps' ADC in a desktop application?

Regards
Steffen
« Last Edit: September 11, 2012, 06:19:29 am by steffen »

sparr

  • Jr. Member
  • **
  • Posts: 70
Read ADC value from desktop application
« Reply #1 on: September 12, 2012, 12:54:07 pm »
you should be able to just connect the FTDI cable to the serial pins on the digispark and use the Arduino Serial library to send output

steffen

  • Newbie
  • *
  • Posts: 2
Read ADC value from desktop application
« Reply #2 on: September 12, 2012, 02:02:28 pm »
Thank you for your reply. I think you got me wrong: I want to use the USB port of the digispark to communicate with the computer and don\'t want to use another chip. Is there a way to get that working?

ellipsisjcs

  • Newbie
  • *
  • Posts: 1
Read ADC value from desktop application
« Reply #3 on: September 19, 2012, 10:45:10 am »
Stemming from Steffen\'s question, is there a way to use the digispark as an USB/serial interface with a computer?  In other words, can you repurpose the digispark as an FTDI programmer similar to what\'s shown here: http://www.instructables.com/id/Arduino-Examples-2-Use-an-Arduino-as-a-FTDI-Progr/step3/Program-The-Arduino/

Thanks in advance from a beginner arduino hobbyist.  Looking forward to tinkering with microcontrollers!

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Read ADC value from desktop application
« Reply #4 on: September 20, 2012, 12:12:24 pm »
@steffen and @ellipsisjcs - it\'s possible to use it as a serial device, but we won\'t be formally supporting that out of the gate - the preferred way to do this will be to talk to it as a USB hid device - we will have full docs, libraries, and demos on how to do this by the time we ship

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Read ADC value from desktop application
« Reply #5 on: November 03, 2012, 06:24:59 pm »
The digispark can run the http://littlewire.cc/ firmware out of the box - so if you use that you get two analog inputs and libraries for querying them from all sorts of different programming languages on Mac, Windows, and Linux (including my own ruby library!)

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Read ADC value from desktop application
« Reply #6 on: November 03, 2012, 06:28:33 pm »
@ellipsisjcs: Yes, you totally can do that too! The http://littlewire.cc/ project includes a cdc232 firmware which allows the digispark (or littlewire) to work as a USB serial converter. It\'s technically not compliant with the USB specification, but it mostly works anyway. cdc232 pretends to be a USB dialup modem sort of gadget, just as the Arduino Uno does, so unlike the FTDI cables, it requires no drivers - they are built in to all modern computers.