This shows you the differences between two versions of the page.
|
digispark:tutorials:connectingpro [2014/12/17 17:42] defragster Update notes of connection 'not recognize' |
digispark:tutorials:connectingpro [2016/06/09 12:03] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ======Connecting and Programming Your Digispark Pro====== | ||
| - | =====Bootloader:===== | ||
| - | |||
| - | The bootloader is the code that is pre-programmed on your Digispark and allows it to act as a USB device so that it can be programmed by the Arduino IDE. | ||
| - | |||
| - | The Digispark runs the micronucleus bootloader version 2, an open source project [[https://github.com/micronucleus ]]. | ||
| - | |||
| - | **CAUTION** We are not at this point supporting upgrading the firmware, so if you decide to, you do so entirely at your own risk. | ||
| - | |||
| - | =====Software:===== | ||
| - | |||
| - | The Digispark Pro uses the Arduino IDE 1.5.x with some custom additions. These will be integrated with the DigiX and Original Digispark additions and released as a package - but for the beta release please follow the instructions below. | ||
| - | |||
| - | First download the appropriate packages: | ||
| - | |||
| - | |||
| - | * Grab the Arduino IDE 1.5.x Beta (must be 1.5.7 or better!) - Page: http://arduino.cc/en/Main/Software | ||
| - | * Grab the the add-ons download for your platform: | ||
| - | * Windows: http://sourceforge.net/projects/digistump/files/Digistump1.5Addons-v092.zip/download | ||
| - | * Mac: http://sourceforge.net/projects/digistump/files/Digistump1.5Addons-v092Mac.zip/download | ||
| - | * Linux: http://digispark.s3.amazonaws.com/digisparkpro_linux.zip (very beta - someone please update?) | ||
| - | * Note: report any issues with the builds to the forum: http://digistump.com/board - Linux beta build compiled by netguy204 - thanks! | ||
| - | |||
| - | ==== General Install ==== | ||
| - | |||
| - | * Unzip the nightly IDE to a folder. | ||
| - | * Unzip and copy the DigiXAddOns/Hardware folder to your (My) Documents/Arduino folder for Mac and Windows (My Documents on windows) and your /home/[username]/Sketchbook folder on Linux. | ||
| - | * Complete the steps below specific to your operating system | ||
| - | * When complete go back to the folder you unzipped and run the Arduino executable to open the Arduino IDE. | ||
| - | * Select Boards->Digispark Pro before uploading. [Programmer / USBasp ] | ||
| - | * Hit upload then plug in or restart the Digispark Pro **when it prompts you to do so**. | ||
| - | |||
| - | ==== Windows Specific ==== | ||
| - | |||
| - | * Run the Install Driver - 32-bit or 64-bit .bat file found in the Digistump Driver folder in the files you just extracted. (32 bit for 32 bit windows, 64 for 64 bit windows) | ||
| - | * **If you have any issues:** see the troubleshooting section | ||
| - | * NOTE: If you use Windows 8/8.1 you must disable driver signature verification. Instructions here:[[http://www.howtogeek.com/167723/how-to-disable-driver-signature-verification-on-64-bit-windows-8.1-so-that-you-can-install-unsigned-drivers/]] - this requirement will be removed after Beta by the use of signed drivers. | ||
| - | |||
| - | ==== Mac OS X Specific ==== | ||
| - | |||
| - | |||
| - | Open 'System Preferences' | ||
| - | {{:digispark:tutorials:preferences_icon.png?nolink&60x54|}} | ||
| - | |||
| - | Select 'Security and Privacy' from your 'System Preference' window {{:digispark:tutorials:security_and_privacy_osx.png?nolink&71x85|}} | ||
| - | |||
| - | Make sure you are in under the 'General' view in 'Security and Privacy' {{:digispark:tutorials:security_general_ios.png?nolink&330x51|}} | ||
| - | |||
| - | Unlock the edit icon in the lower left hand (this will require that you have an account that allows you to modify these setting.) | ||
| - | {{:digispark:tutorials:login_ios_security.png?nolink&480x307|}} | ||
| - | |||
| - | You will know you are successful because the icon in the lower right side of the dialog will be unlocked | ||
| - | {{:digispark:tutorials:unlock_security_option.png?nolink&320x61|}} | ||
| - | |||
| - | Ensure that you have enabled non-Store apps under System Preferences | ||
| - | {{:digispark:tutorials:anywhere_selected_ios.png?nolink&502x271|}} | ||
| - | |||
| - | You can now download and unzip to a folder - hint if you use Safari it will complete the unzip for you. | ||
| - | |||
| - | Use or install as you would any other App. If you need assistance please check the Apple site for further help - 'http://support.apple.com/kb/PH11356'. | ||
| - | |||
| - | Why do I have to unlock my security to install the Digispark editing application? Is this safe? | ||
| - | |||
| - | //Apple has a developer policy that requires developers to choose to work inside or outside of its application ecology. Developers who work inside of the ecology register with Apple and pay licensing fees. Apple then applies criteria from its application store policy to the app. Apple does not block users from installing apps built outside of it ecology, but it requires users to accept that these apps are not Apples responsibility - http://support.apple.com/kb/ht5290 // | ||
| - | |||
| - | |||
| - | {{:digispark:tutorials:digispark_about.png?nolink&518x300|}} | ||
| - | |||
| - | |||
| - | //Currently the Digispark development tool was created outside of this ecology and is likely to stay this way. It is opensource.While the developers have not built this app under the supervision of Apple they have signed this. When the application is launched you can go to the Arduino menu and select 'about Arduino' where the developers have made a public who they are and what code they have modified.// | ||
| - | |||
| - | See the troubleshooting section below for any other issues. | ||
| - | |||
| - | ==== :Linux Specific ==== | ||
| - | |||
| - | Make sure you installed lib32stdc. | ||
| - | | ||
| - | by issuing: apt-get install lib32stdc++6 | ||
| - | |||
| - | * **ATTENTION LINUX USERS:** [[digispark:tutorials:linuxtroubleshooting|PLEASE CHECKOUT THE LINUX TROUBLESHOOTING PAGE**]] | ||
| - | * Install the Udef rules for the Digispark/Digispark Pro (same rules for both) | ||
| - | * Use the udef rules found here: [[http://digistump.com/wiki/digispark/tutorials/linuxtroubleshooting|Troubleshooting section]] | ||
| - | |||
| - | |||
| - | =====Windows Installation:===== | ||
| - | |||
| - | Unzip to a folder. | ||
| - | |||
| - | Before plugging in the Digispark or running the Arduino IDE you must install the driver. | ||
| - | |||
| - | To install the driver go into the folder you just unzipped and go to the "Digispark - Windows Driver" folder. Inside that folder run the InstallDriver executable file. Go through the wizard to install the Digispark driver. | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | =====Using the Digispark with the Arduino IDE:===== | ||
| - | |||
| - | The Digispark (and Pro) works a bit differently than some Arduino compatible products. Not only is there a special add-on to the IDE to support it, but it also programs with a different procedure. | ||
| - | |||
| - | |||
| - | From the Tools menu select Board->Digispark Pro | ||
| - | (see below for the difference between the two Digispark option, but either will do for getting started) | ||
| - | |||
| - | From the Tools menu select Programmer->Digispark Pro | ||
| - | |||
| - | Write some code, open your code, or open a Digispark example. | ||
| - | |||
| - | **You do not need to plug in your Digispark Pro before invoking upload** | ||
| - | |||
| - | Hit the upload button. The bottom status box will now ask you to plug in your Digispark Pro - at this point you need to hit the reset button on it or plug it in. | ||
| - | |||
| - | You'll see the upload progress and then it will immediately run your code on the Digispark Pro. | ||
| - | |||
| - | If you unplug the Digispark Pro and plug it back in or attach it to another power source there will be a delay of 5 seconds before the code you programmed will run. This 5 second delay is the Digispark Pro checking to see if you are trying to program it. | ||
| - | |||
| - | =====Your first upload:===== | ||
| - | |||
| - | If you're just getting started try the above procedure with the following example | ||
| - | |||
| - | Here is the code it will load: | ||
| - | <code> | ||
| - | // the setup routine runs once when you press reset: | ||
| - | void setup() { | ||
| - | // initialize the digital pin as an output. | ||
| - | pinMode(1, OUTPUT); //on board LED | ||
| - | } | ||
| - | |||
| - | // the loop routine runs over and over again forever: | ||
| - | void loop() { | ||
| - | digitalWrite(1, HIGH); // turn the LED on (HIGH is the voltage level) | ||
| - | delay(1000); // wait for a second | ||
| - | digitalWrite(1, LOW); // turn the LED off by making the voltage LOW | ||
| - | delay(1000); // wait for a second | ||
| - | } | ||
| - | </code> | ||
| - | |||
| - | This code will blink the BUILT IN LED on Pin 1 | ||
| - | |||
| - | As soon as it has uploaded you should see the LED start to blink! | ||
| - | |||
| - | |||
| - | |||
| - | =====Precautions:===== | ||
| - | |||
| - | The Digispark Pro, due to its small size and low cost is not as robust as a full blown Arduino. | ||
| - | |||
| - | The Digispark Pro does not have reverse polarity protection. Connecting power to the Digispark Pro power pins backwards will almost certainly destroy it. | ||
| - | |||
| - | The Digispark Pro does have a 0.5A fuse for both the USB and VIN lines - this should safeguard it from brief shorts - but is not by any means a failsafe. | ||
| - | |||
| - | The Digispark Pro is small enough to present a choking hazard and small enough to be inserted into some sockets. We take no responsibility for misuse of the product. Please treat electricity and electronics with respect and common sense. | ||
| - | |||
| - | =====Troubleshooting:===== | ||
| - | |||
| - | The Digispark Pro pushes affordable, small components to their limits by using software to emulate USB functions generally served by a dedicated chip. For this reason much of the Digispark's USB operation is considered borderline out of spec. Certain laptops, older machines, and just some cheaply made USB hubs/controllers do not like this. We tested and designed the Digispark Pro for maximum compatibility but we can not guarantee it will work with everything. | ||
| - | |||
| - | In addition remember the Digispark Pro only shows up as a programmable device for 5 seconds, after that it will start running its code (when it is new and un-programmed this means it will blink) and disappear or act like the USB device you programmed it to act like. | ||
| - | |||
| - | Always remember plug in or restart the Digispark Pro when the Arduino IDE requests you to. | ||
| - | |||
| - | **If the computer will not recognize the Digispark Pro try the following:** | ||
| - | |||
| - | * Try connecting it to another USB port or system. | ||
| - | * [USB 2 on Windows may be better] | ||
| - | * Try connecting it to the rear ports (if a desktop) | ||
| - | * Try connecting it to a USB hub. | ||
| - | * Try a powered USB hub. | ||
| - | * Use a different cable, especially if system ignores the device. | ||
| - | |||
| - | **If it won't upload:** | ||
| - | |||
| - | **Did you set your board AND programmer to Digispark in the Arduino IDE?** | ||
| - | |||
| - | |||
| - | **WINDOWS:** | ||
| - | |||
| - | * **Did you install the driver?** | ||
| - | * For the example programs if you are getting "Device not found" even after installing the DigiUSB driver in the examples folder then try this: http://digistump.com/board/index.php/topic,257.0.html | ||
| - | * If Windows does not recognize a "DigiUSB" but a generic "HID-compliant device"/"USB Input Device" pair, go to the Device Manager, find in the "Human Interface Devices" category the USB Input Device with a vendor ID of 0x16C0 and select "update driver" / "browse my computer" / "let me pick from a list" and the DigiUSB should show up there. | ||
| - | |||
| - | **MAC** | ||
| - | |||
| - | * If the Arduino application works fine but the computer does not recognize the Digispark after you are asked to plug it in - try a usb extension cable or hub, some MacBook's ports are recessed too far for the data connectors to make contact. | ||
| - | * **If the Arduino application won't start (especially an error like: "Arduino" is damaged and can't be opened.) or the upload fails try allowing all unsigned code to be run: See the "How to change Gatekeeper settings to allow or disallow unidentified apps" section on this page: http://www.imore.com/how-open-apps-unidentified-developer-os-x-mountain-lion** | ||
| - | * If you're getting the error above and allowing unidentified apps doesn't fix it try this: http://digistump.com/board/index.php/topic,119.0.html - we are actively working on a fix for this issue. | ||
| - | * **2012 MBP** The USB ports on the 2012 MBPs (Retina and non) cause issues due to their USB3 controllers, currently the best work around is to use a cheap USB hub (non USB3) - we are working on future solutions. The hub on a Cinema display will work as well. | ||
| - | |||
| - | |||
| - | |||
| - | **LINUX:** See the [[digispark:tutorials:linuxtroubleshooting|Linux troubleshooting page]] | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | If your upload fails in the middle of it, you may also be using a bad USB cord and or a bad hub. | ||
| - | |||
| - | Support requests are best posted to the forum, so everyone can benefit and we can help eachother through any issues - http://digistump.com/board | ||
| - | |||
| - | |||