electricimp / reference

Electric Imp Reference Code
MIT License
94 stars 65 forks source link

Inverting reset logic to work with SparkFun shield. #6

Closed nseidle closed 10 years ago

nseidle commented 10 years ago

I can't find a schematic or info for Impeeduino so I'm not sure if you've got an inverted reset line? Seems odd. Please point me in that direction if available.

This pull request modifies the reset logic to work with the SparkFun Imp Shield.

Code works great! Thanks for this. Bootloading a target Arduino from anywhere in the world is pretty spectacular!

blindman2k commented 10 years ago

I will ask if I can release the Impeediuno spec. We haven't up to now for specific reasons but things may have changed. However, If we merge this code in as-is then our Impeeduino won't work, which defeats the purpose of calling it Impeeduino code. I recommend you copy this into a separate file.

I had never worked on Arduino before Electric Imp. I never realised just how cool working with the Imp was until I found out just how boring working with Arduino was :)

A.

Aron Steg _BCDE Investments, _SMS Diagnostics, SMS Broker, Zaq, Explainers Tel: +1 (415) 728-6707 or +61 3 9111 5768 | Fax: +61 3 8677 7613 | [image: LinkedIn] http://au.linkedin.com/in/aronsteg [image: Twitter]http://www.twitter.com/blindman2k [image: Twitter] http://www.twitter.com/MittoSMS

On Tue, Jan 28, 2014 at 8:13 PM, Nathan Seidle notifications@github.comwrote:

I can't find a schematic or info for Impeeduino so I'm not sure if you've got an inverted reset line? Seems odd. Please point me in that direction if available.

This pull request modifies the reset logic to work with the SparkFun Imp Shield https://www.sparkfun.com/products/11401.

Code works great! Thanks for this. Bootloading a target Arduino from

anywhere in the world is pretty spectacular!

You can merge this Pull Request by running

git pull https://github.com/nseidle/reference master

Or view, comment on, or merge it at:

https://github.com/electricimp/reference/pull/6 Commit Summary

  • Inverting reset logic to work with SparkFun shield.

File Changes

  • M hardware/impeeduino/impeeduino.device.nuthttps://github.com/electricimp/reference/pull/6/files#diff-0(41)

Patch Links:

Reply to this email directly or view it on GitHubhttps://github.com/electricimp/reference/pull/6 .

nseidle commented 10 years ago

No worries! I know what it's like to manage repos+hardware. I forked the repo to Tomatoless Boots and did some work to reduce the bootload time from multiple seconds to less than a second by adding a character length check to SERIAL_READ(). The basic improvement is:

local charsRead = 0;
LINK.write(0); //Turn LED on
do {
    local ch = read();
    if (ch != -1) {
        writen(ch, 'b')
        charsRead++;
        if(charsRead == len) break;
    }
} while (ms() - started < timeout);
LINK.write(1); //Turn LED off

There were a few other tweaks as well. I hope this helps! Thanks for writing the original.

blindman2k commented 10 years ago

Thats a worthy change :) I will test it when I can.

On Wed, Jan 29, 2014 at 9:34 PM, Nathan Seidle notifications@github.comwrote:

Closed #6 https://github.com/electricimp/reference/pull/6.

Reply to this email directly or view it on GitHubhttps://github.com/electricimp/reference/pull/6 .