Author Topic: I need a debuging option  (Read 11776 times)

RC Navy

  • Jr. Member
  • **
  • Posts: 54
  • When you like, even too much, it is not enough!
Re: I need a debuging option
« Reply #15 on: May 04, 2013, 03:44:03 pm »
Hi,

For those who still have a serial port (native, or through a RS232/USB adapter), I propose an alternative to DigiUSB.
The idea is to send/receive debug/info messages to/from a PC through a regular RS232 serial port but using a single I/O of the Digispark. The external interface is composed of 2 resistors and a regular diode (See link below). This approach allows to use the built-in Serial Monitor of the arduino IDE.
Thanks to the help of the last modifications of the <SoftSerial> and <TinyPinChange> libraries, it's now possible to declare  a SoftSerial object with the same pin for Tx and Rx: two additional methods allow to switch from rxMode to txMode.

I wrote a summary at the bottom of: http://digistump.com/wiki/digispark/tutorials/debugging

Please, find here the <SoftSerial> and <TinyPinChange> updated libraries (which are already in the Digispark IDE)  to benefit of the debugging capabilities:
http://p.loussouarn.free.fr/partage/arduino/Libs4Digi_1io_Debug.zip
Just replace existing DigisparkTinyPinChange and DigisparkSoftSerial directories with new ones in DigisparkArduino-Linux32/Digispark-Arduino-1.0.4/libraries directory.
You will find usefull examples in each library after restarting your IDE.

This alternative is mainly recommanded if you didn't plan to use DIgiUSB in your final sketch, or if you haven't enough pins.

@ albercook: hope, this will help...

RC Navy
« Last Edit: May 05, 2013, 08:07:41 am by RC Navy »

pulsephase

  • Newbie
  • *
  • Posts: 1
Re: I need a debuging option
« Reply #16 on: June 18, 2013, 10:01:21 am »
Not sure if I did this right or not.

I downloaded the new dll and put it in
C:\WINDOWS\system32

I then downloaded Echo from the examples
plugged in my digispark
once download was finished I went to the DigiUSB Progarms folder and doubled clicked digiusb.exe

At this point I got the window that blinked open and immediately disappeared.
Hey man sorry for my english but I've found a solution... I had your same problem til 5 minutes ago, so I had an idea: put "pdcurses.dll" in the same folder of digiusb.exe and try again. Now it works! See the screenshot

Hope it works with you too

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: I need a debuging option
« Reply #17 on: June 18, 2013, 03:41:32 pm »
This is already done for you on the newest version of our software as well.