6

I don't think it is supposed to. The Digispark briefly connects in "bootloader" mode, which you spotted as "Vendor-Specific Device:". Then after 5 seconds it runs the loaded sketch. If your sketch doesn't create a USB port (eg. a keyboard) then it will disappear from the USB list. See: http://digistump.com/wiki/digispark/tutorials/connecting You don't ...


6

i=i++; //increment by one The result of the above statement is not defined. That is, it is not necessarily "i + 1". See: http://en.wikipedia.org/wiki/Sequence_point http://c-faq.com/expr/seqpoints.html Instead use: i++; Or: i = i + 1; A note about "undefined behavior": http://en.wikipedia.org/wiki/...


5

The problem is your keyboard layout. The USB HID protocol was originally intended to include keyboard layout information in it (country code selection in the descriptor) however no one ever used it. All keyboards have the same layout, but manufacturers just print different letters on the keys for different countries. It's down to the operating system to ...


4

You can set the clock prescaler at run time. For example: #include <avr/power.h> void setup() { clock_prescale_set(clock_div_8); // etc... } More details in the documentation from avr-libc. Note that with this method your Digispark will still be overclocked when booting, so it might not be 100% reliable. But it will be overclocked only for ...


3

It can be done. Your Digispark has SPI pins, which are ISP pins. For the esp8266 there is an ESP8266AVRISP library for OTA upload to AVR. You can use the example of the library. You must wire the SPI pins and ground together. Wire reset pin of Digispark to io 5 (D1) of NodeMcu. You should use level conversion, but esp8266 tolerates 5 V TTL (not recommended ...


3

Digisparks are known to have problems with USB3 ports (which your USB-C adaptor probably provides). Try using a cheap USB2 hub between the DigiSpark and the adaptor. It's always a good idea to use a cheap USB hub between whatever experimental device you want to connect and your machine, so that if you wire something up incorrectly you don't end up frying an ...


3

I have no idea why they haven't used a fixed pull-up, but the pull-up is only done when the controller wants to read the sensor for only about 120us. If you want to get a good resolution in the resistance measurement, the resistance of your pull-up should be in the same range as the resistance of your sensor. If your sensors have low resistance, this ...


2

You can edit the file scancode-ascii-table.h in your DigiKeyboard library. It basically states which ASCII code corresponds to which keyboard scancode. So if you try to print the ':' character but get a '>' instead, you know that in the above mentioned file at the ASCII position for ':' is the scancode for a '>'. Using this, you can swap the scancodes ...


2

The digispark uses the micronucleus bootloader. You can flash that directly onto an Tiny85 without needing the digispark module. So your existing Tiny85 solution could acquire the USB bootloader if you can spare the 2k program space for the bootloader. I realize this is not a direct answer to your question, but you did note that you have a Tiny85 solution ...


2

You can make a copy of WString.cpp, edit it, and add it to your project. Note however that: You will have to define every method that you use. Otherwise the linker will pull WString.o from the Arduino core library in order to resolve the missing methods, and then it will complain that some methods have been defined twice. Just pruning WString.cpp from ...


2

#include <SPI.h> #include <SD.h> File file; int const pinCS = 2; void setup() { SD.begin(pinCS); file = SD.open("Test.txt", FILE_WRITE); file.println("anything"); file.close();} ...


2

Yes you can connect it: http://elm-chan.org/fsw/ff/00index_p.html Your happiness depends on what you want to accomplish. Simple streaming, like feeding an FPGA with a bitstream is achievable. Logging an incoming data stream to the SD card filesystem is probably not.


2

In short I am going to say NO. The flash is too small to adequately run the SD library as well as the rest of your Arduino code. The RAM is also underpowered for what is needed to properly access files on an SD card. Having said this, I am sure there are some clever software engineers that could write a cut down SD card library to do limited commands. ...


2

I want to transmit I2C data... A little vague. Transmit to what device? How fast is your data rate (100kHz, 400kHz)? Your only transmitting and not reading anything back? What is the idling voltage of your I2C bus (to then ask if you have chosen correct pull-up resistor values for your intended bus speed)? You mention that the Wire library doesn't ...


2

You connected the power backwards - so all the current is being shunted straight through the ESD protection diodes (and likely other routes too) generating lots of heat and risking permanent damage to the MCU. Take better care next time...


2

Micronucleus uses control transfers to upload code (it's not a CDC device). You don't need an endpoint for control transfers - they use the implicit endpoint 0 that is always present whether you define one or not. You only need to define endpoints for interfaces that want to communicate using bulk, interrupt or isochronous transfers. Bus 003 Device 073: ID ...


2

I got the same issue, on two boards. Will probably try to burn the bootloader using usbasp, maybe they burned the wrong one back in china. EDIT: As expected flashing the micronucleus bootloader using USBasp solved the problem on both of the boards. I've used burn-o-mat as the arduino was not seeing my programmer. Just download the firmware from github (I'...


2

For this I would recommend isolating the power from the batteries with P-channel MOSFETs and only switching them on when you want to sample the voltage. This means that there is no power consumption at all (aside from an absolutely minuscule leakage current) when turned off. The whole setup would require 4 MOSFETs - two P-channel and two N-channel. They don'...


2

I had a quick look into the Schematics of a digisparc board. P1 is hardwired over an LED and a resistor to GND. If you turn on the PULL UP resistor for P1 the LED should light up and the voltage at P1 would be very low (it depends on the voltage divider that is built from the PULL UP resistor and the LED resistor); so the P1 reading should be LOW. If you ...


1

The reason this doesn't work is that PB5 is pulled high (as it's used as -RESET pin on the board). The code can be rewritten to use only one ADC pin though.


1

I hope I'm not too late here, but I believe you may need to update the bootloader. Could you try the instructions here? https://www.iot-experiments.com/micronucleus-bootloader-upgrade/ I happened to be reading through this guide: https://hackernoon.com/low-cost-usb-rubber-ducky-pen-test-tool-for-3-using-digispark-and-duck2spark-5d59afc1910 and the ...


1

After five seconds, which is when the bootloader should switch to running your code, how does it show up in the list of usb devices (lsusb in Linux, Device Manager in Windows, etc.) The original Digispark was a bit temperamental when plugged into USB 3 ports. If you are plugging it into one, try using a usb2 hub and plugging it into the hub instead. Also, ...


1

SoftSerial and a real serial port on the mac will work. Or if you are careful use the DigiKeyboard and print the debug to the HID keyboard REMEMBERING to switch to a notepad equivalent window on the mac to receive and display the debugging text and not have it overwriting the arduino sketch by mistake. DigiCDC is a kludge that does not work properly on ...


1

You might check out my fork of DigistumpArduino library (https://github.com/rsrdesarrollo/DigistumpArduino) with full keyboard layouts support.


1

How would i go about finding out if there is the needed driver on that computer where the digispark is plugged in I can't think of any way to do that. That's like asking if a keyboard you plug into a USB port can tell if you have Photoshop installed or not. Is there any way to add my program made in c# to the digispark ... No. The Digispark is a tiny ...


1

bHogan seems to be the original developer of TinyWireM and TinyWireS. Andreas Spiess ("The guy with the Swiss accent") used rambo's implementation of the TinyWire library for his I2C sensor, and rambo on GitHub and bHogan on arduino.cc seem to be the same person... I've also used rambo's TinyWire library, and managed to make it work. Adafruits version of ...


1

I would suggest to connect one pin of the with to 5v and the other to ground. The Arduino will be able to detect 5v as logic HIGH. The code looks correct except for better programming technique I would suggest to indent you code, this make debugging easier for longer programs: #include "DigiKeyboard.h" void setup() { pinMode(0, INPUT); } void loop()...


1

You may use DigiCDC to virtually create a serial device. It's slow but does the job as mentioned in this article. A serial-echo program would look something like this: #include <DigiCDC.h> void setup() { SerialUSB.begin(); } // the loop routine runs over and over again forever: void loop() { if (SerialUSB.available()) { SerialUSB.write(...


1

have read that the ATTINY 85 does not have a serial port. It depends on your definition of serial port. From a hardware perspective it has a usi. That can be configured as a uart. Whether it fits your need or not is up to your application. Read the datasheet to be sure.


1

Looking at the code, the first argument should be the key, and the second the modifiers. So DigiKeyboard.sendKeyStroke(MOD_CONTROL_LEFT + MOD_SHIFT_LEFT + KEY_ENTER); should become: DigiKeyboard.sendKeyStroke(KEY_ENTER, MOD_CONTROL_LEFT + MOD_SHIFT_LEFT);`


Only top voted, non community-wiki answers of a minimum length are eligible