Recent Posts

Pages: 1 ... 8 9 [10]
91
Digispark (Original) Support / Program Digispark
« Last post by Pakocip on October 28, 2019, 02:10:46 pm »
Hello,
I’m new in this forum.
I programmed arduino to use a gas sensor Mq-2; my idea is to program Digispark to use this sensor, there are somebody than help me?

Thanks a lot
92
Digispark (Original) Support / Program Digispark
« Last post by Pakocip on October 28, 2019, 02:08:06 pm »
Hello,
I’m new in this forum.
I programmed arduino to use a gas sensor Mq-2; my idea is to program Digispark to use this sensor, there are somebody than help me?

Thanks a lot
93
Digispark Libraries / Multiple libraries were found error
« Last post by crdit on October 21, 2019, 11:31:57 am »
I am attempting to program a Digispark usb from scratch. I am trying to use DigiKeyboard.h and DigiMouse.h libraries, but I cannot compile with both of them in the program.

Code: [Select]
#include <DigiKeyboard.h>
#include <DigiMouse.h>
void setup(){
 DigiMouse.begin();
}

void loop(){
  DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_RIGHT);
  delay(200);
  DigiKeyboard.print("mspaint.exe");
  delay(200);
  DigiKeyboard.sendKeyStroke(KEY_ENTER);
  delay(200);
  DigiKeyboard.sendKeyStroke(KEY_F11);
  delay(200);
DigiMouse.delay(100);
}

error string:
In file included from C:\Users\ethan\Desktop\sketch_oct19a\sketch_oct19a.ino:1:0:

C:\Users\ethan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkKeyboard/DigiKeyboard.h:220:8: error: 'unsigned char usbFunctionSetup(unsigned char*)' previously defined here

  uchar usbFunctionSetup(uchar data[8]) {

        ^

In file included from C:\Users\ethan\Desktop\sketch_oct19a\sketch_oct19a.ino:2:0:

C:\Users\ethan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkMouse/DigiMouse.h: In function 'unsigned char usbFunctionDescriptor(usbRequest*)':

C:\Users\ethan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkMouse/DigiMouse.h:319:16: error: invalid conversion from 'const unsigned char*' to 'unsigned char*' [-fpermissive]

      usbMsgPtr = rt_usbDeviceDescriptor;

                ^

C:\Users\ethan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkMouse/DigiMouse.h:324:16: error: invalid conversion from 'const unsigned char*' to 'unsigned char*' [-fpermissive]

      usbMsgPtr = rt_usbHidReportDescriptor;

                ^

Multiple libraries were found for "DigiKeyboard.h"
 Used: C:\Users\ethan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkKeyboard
Multiple libraries were found for "DigiMouse.h"
 Used: C:\Users\ethan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkMouse
exit status 1
94
Digispark (Original) Support / ATTINY85 Not Recognized
« Last post by Kalpit on October 19, 2019, 05:09:22 am »
Help!Help!Help!

I've been using ATTINY85 From About 6 Months And I'm a Beginner.
Today I Was Programming My ATTINY85 And I Uploaded A Code Using DigiKeyboard.h Library. The Used 78% Of ATTINY85 And The Stopped Working As A Keyboard After Than And When I Deleted Some Part Of Code, The Space It Took Was 72% And The Code Started Working.

I Read On The Internet That If I Programme It With Arduino as ISP Then It Will Offer More Space So I Thought That I Should Use Programmer.

After Programming Through Arduino UNO, The Computer Stopped Recognising The ATTINY85. I Can Upload Codes Using Programmer But Can't Do That Directly(I've Tested Start Or Blink Code On ATTINY85 And It Is Working Correctly).   

My Schematics Are:
Arduino 5V connects to ATTiny85 Pin 8 (Vin)
Arduino GND connects to ATTiny85 Pin 4 (GND)
Arduino Pin 13 connects to ATTiny85 Pin 8 (SCK)(P2)
Arduino Pin 12 connects to ATTiny85 Pin 7 (MISO)(P1)
Arduino Pin 11 connects to ATTiny85 Pin 6 (MOSI)(P0)
Arduino Pin 10 connects to ATTiny85 Pin 1 (Slave Reset)(P5)

Note: I'm Using ATTINY85 Module(With Micro USB Port For Uploading Code) Not Chip Only.

When I Pressed Burn Bootloader And It Said 'Error while burning bootloader: missing 'bootloader.tool' configuration parameter'(When I Selected The Board As Digispark(Default-16.5MHz).

I Searched The Internet And Got To Know That To Burn Bootloader, I Need To Install The 'attiny library by David A. Mellis'.

I Added 'https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards manager/package_damellis_attiny_index.json' To Preferences And Downloaded The 'attiny library by David A. Mellis'.

I Uploaded The Bootloader With Following Settings In Tools Tab:

Board: "ATtiny 25/45/85"
Processor: "ATtiny85"
Clock: "Internal 8 MHz"

And Now The Problem Is Still The Same, The Computer Still Doesn't Recognize The Board And But I'm Able To Upload Codes Through Programmer.

I'm Uploading Code With Digispark(Default-16.5MHz) As Board And Uploading Bootloader With ATtiny 25/45/85 (ATtiny85 As Processor) As Board.

Hope You Will Help  Me Solve My Problem.
:)

At last, My Question Is That Can Anyone Tell Me Why The Code Is Working At 72% And Not 98%? And What Can I Do To Let Computer Recognize The ATtiny85
95
Digispark Libraries / Re: Big font
« Last post by kumarip on October 19, 2019, 01:36:42 am »
Thanks for the information.
96
Digispark Projects / DigiSpark + Temperature Sensor
« Last post by NoG on October 18, 2019, 12:22:04 pm »
Dear coders,
I was just trying to connect and test some modules (sensors) on the Digispark. I was also testing DHT11 temperature sensor. I have coded just really simple code for it. I have used DigisparkKeyboard feature, since Digispark does not support Serial Monitor. However it seems like, I have also done some mistakes in my code. I'm sure, that my circuit connection is OK. Can I ask, why I do not get any output?
Thank you for all the answers.

Code:
Code: [Select]
#define period 5

#include <DHT.h>
#include <DigiKeyboard.h>
DHT dht(4, DHT11);

void setup() {
  dht.begin();
  DigiKeyboard.sendKeyStroke(0);
}

void loop() {
  float t = dht.readTemperature();
  float h = dht.readHumidity();

  DigiKeyboard.println(t);
  delay(period*1000);
}
97
Digispark (Original) Support / Re: TAB key to move around windows
« Last post by theRAGEhero on October 17, 2019, 09:03:22 am »
thank you, I'll try!
98
Digispark (Original) Support / Upgrading firmware on clone (rev 3)
« Last post by rev on October 17, 2019, 06:38:44 am »
Hello.

I received some cloned digistumps (rev 3) and i'm wondering if anyone here has any advice on updating their firmware? They seem to be a bit finicky at the moment.
I ran zadog which says they are running libusb0 (v1.2.6.0). Arduino claims device firmware is 1.6. Can i do something to improve their reliability?
Sometimes when plugged in they don't run the program.

Also, will digistumps generally be damaged by unplugging mid execution? I guess not since it loops forever once program is done but just wanted to check.
99
Digispark Pro Support / Rand funtion on Attiny 167 - Digispark PRO
« Last post by Rimbaldo on October 17, 2019, 05:44:22 am »
Hi! I'm trying to shuffle an array with the random() function on arduino's IDE but it seems that it's not working.

Does the random() function works on the Attiny 167 (Digispark PRO)?

Thanks!
100
Digispark (Original) Support / Re: Arduino attiny85 keyboard
« Last post by granzeier on October 17, 2019, 03:38:28 am »
It appears that the scan code is based on which physical key (by location on the keyboard) is pressed. The thread at: https://stackoverflow.com/questions/38058419/is-scan-code-the-same-on-all-keyboards shows the physical key layout, with the scan codes, and then shows the layout for both the QWERTY, and the AZERTY keyboards. What you will need to do is to look up the letter that you want (for example the Q) and the find the scan code on the key which is physically in the same position (17 for the QWERTY, but 31 for the AZERTY keyboards.)

This scan code table appears to be in decimal, which is what the sendKeyStroke statement uses. So, you would want to use something like:
Code: [Select]
DigiKeyboard.sendKeyStroke(31);
Try that, and see if it does what you want. If not, try searching for other keyboard scan code tables, and see if one of them will work.

This should work for any keyboard layout (you will need to locate the letter you want on the scan code layout, and use that code.) Otherwise you could modify the DigiKeyboard.h library (https://github.com/digistump/DigisparkArduinoIntegration/blob/master/libraries/DigisparkKeyboard/DigiKeyboard.h,) then you could use any of the DigiKeyboard commands, and not just the sendKeyStroke command.
Pages: 1 ... 8 9 [10]