I installed the Digispark bords as shown here using this link
http://digistump.com/package_digistump_index.json: http://digistump.com/wiki/digispark/tutorials/connecting It’s work fine from the arduino environment, but when I try to compile in Visual Micro I get errors.
My code is the simple blink...:
void setup() {
//All pins are capable of Digital output, though P5 is 3 V at HIGH instead of 5 V
pinMode(1, OUTPUT); //0 is P0, 1 is P1, 2 is P2, etc. - unlike the analog inputs, for digital outputs the pin number matches.
}
void loop() {
digitalWrite(1, HIGH); //Turn the pin HIGH (5 V)
delay(1000);
digitalWrite(1, LOW); //Turn the pin LOW (GND)
delay(1000);
}
If I compile for debug I get:
Compiling debug version of 'AtTiny' for 'Digispark (Default - 16.5mhz)'
AtTiny.ino:In function 'void setup()
AtTiny.ino:6:70: error: no matching function for call to 'VisualMicroDebug::begin(TinyDebugSerial*, long int)
:void setup() {
debugger: The error shown above might be caused by invalid breakpoint syntax?
AtTiny.ino:candidates are
AtTiny.ino:In file included from
VM_DBG.h:begin(HardwareSerial*)
:void begin(HardwareSerial *theSerial)
VM_DBG.h:candidate expects 1 argument, 2 provided
VM_DBG.h:begin(HardwareSerial*, long unsigned int)
:void begin(HardwareSerial *theSerial, unsigned long baud)
VM_DBG.h:no known conversion for argument 1 from 'TinyDebugSerial*' to 'HardwareSerial*
Error compiling project sources
If I compile for release i get:
Compiling 'AtTiny' for 'Digispark (Default - 16.5mhz)'
Binary sketch size: 650 bytes (used 11% of a 6.012 byte maximum) (0,60 secs)
Uploading to I/O board using 'COM6'
Upload failed. Did you select the correct upload method for this board?
System.NullReferenceException: Object reference not set to an instance of an object.
at Visual.Micro.MiroAppAPI.debug.AvrdudeUploader.uploadUsingPreferences(String buildPath, String className, Boolean verbose, Boolean ProgrammerUploadUsing, String mcuProgrammerOverrideName)
at Visual.Micro.MiroAppAPI.SketchEditor.Upload(Boolean verbose)
Beside the compilation problems, I don’t know how to select COM port.
When compiling and uploading form Arduino, it asks me to connect the AtTiny after compiling:
Build options changed, rebuilding all
Sketch uses 302 bytes (5%) of program storage space. Maximum is 6,012 bytes.
Global variables use 9 bytes of dynamic memory.
Running Digispark Uploader...
Plug in device now... (will timeout in 60 seconds)
What am I doing wrong?