Comments (8)
let us not not not touch the bootloader. i've already flashed these all and want to just ^^b them with the final firmware. i'd also like to avoid spending too much time addressing edge cases which benefit only this newest version pcb
i do like 1+2. effectively indicates POWER and NOT-CRASHED
how can we make #2 lowest possible cpu use?
if 3 is the packet flash, let's just have it be an XOR so it's one line without any timers or anything, which i think is a cpu burden for a 99.9% unused feature
from crow.
re: LED, the primary support issues are:
- is crow receiving power?
- is crow successfully running a script / otherwise working fine (eg. not crashed / in some weird state + not in bootloader)?
- has my USB port failed?
microcontroller status also seems useful for us to be able to identify from an LED pattern.
DAC state seems easy to diagnose at home, as lots of folks write in with stuff like "I've got 10V on every output", so that seems less ambiguous.
hopefully that helps -- lmk if i can pull anything else from support emails!
from crow.
@trentgill my preference (not strong) is for option A, default "on" (/strong) --- which covers the predominate use case of norns dongle driving JF. people w/ TT will be able to navigate this territory
from crow.
@tehn agreed that option A is better. doesn't change the API at all & simply provides a more reasonable amount of pullup current.
@dndrks ok i think we can do all 3. how about this:
- is crow receiving power? turn on the LED at the very start of the stm program. So if the LED comes on, we know the stm has booted which means we have the power running successfully. even if the program quickly crashes, the LED should at least blink when turning on the case.
- crow running normally: slow fade in/out (never turns all the way off). around 2seconds cycle time.
- crow running & connected to a USB host: quick fade cycle (~500ms cycle time).
3b) alternatively we could have the same as (2) but flash the LED fullbright whenever a message is sent/received over USB. Would this be helpful beyond "USB connected"? eg. for cases where druid isn't working, but crow hardware is working ok (is this a real-world problem case?)
@dndrks do we need to indicate that we're in bootloader mode? if so, i need to make a change to the bootloader project (which is separate from this repo).
i'll get the hardware stubs built in now, but i don't have new hardware to test. should be pretty basic though, and i'm confident i can get it working without hardware in hand. if we have issues getting things up, i'll have you send one of the new units over.
from crow.
@trentgill , those proposals all sound good!
- yeah, having any indication that the module is on / able to turn on would help cast aside doubt when crow shows as disconnected in druid for other reasons (eg. weird path stuff, or maybe you told macOS not to trust crow, etc).
- normal / standalone 2s cycling makes sense!
- mirroring data sent/received over USB would be rad! even if just for non-druid situations (eg. Max or norns) where you want quick visual confirmation that the message you sent was received by crow, so then if you aren't getting the result you want it's likely a code issue.
i think indicating bootloader would be a nice-to-have, since druid announces that crow is disconnected when crow is fully functional but just happens to be in bootloader vs. when crow isn't actually connected.
lmk if there's anything else i can help with! <333
from crow.
ok i'll get working on this. already got the pullups done & ready to test.
re: 3) i note that the LED is not visible when the module is screwed into the case. i don't love the idea of telling people to remove the module from the case to check the status light when running, but i guess it's a nice to have for last-ditch-effort debugging before claiming a hardware issue?
i'll take a look at the bootloader - should really just be copying the same code into the bootloader. perhaps in BL mode it can just blink twice a second so it's a distinctly different visual.
@tehn i think it should be possible for druid to detect crow in bootloader mode. this would be a very helpful thing to communicate when entering bootloader mode i think! but it could be more of a burden than necessary. perhaps a better solution is to just match on ^^b
and print a message saying "crow is now in bootloader mode, open another terminal and run druid firmware
to update crow's firmware". would probably be a 10 minute change?
after @tehn's comments:
ok, noted re: CPU usage. it also drastically simplifies the code to just blink rather than worry about PWM. updated proposal:
- turn on LED at boot (if LED is stuck on, it suggests some kind of uC setup failure)
- without USB connection: toggle high/low once per second for a 2s duration squarewave
- when USB is connected: toggle high/low 4x per second (for 500ms squarewave), and XOR the output state on USB tx/rx.
i think this effectively communicates the 2 working states, and should give some blinky / half-bright fuzziness when sending USB packets. it will also be super minimal CPU usage - simply adding a condition check in each background loop, then when it's time to toggle, it just sets variable & toggles the GPIO.
from crow.
the super minimal version sounds right to me!
also, having druid reflect bootloader state would be super super helpful, and would meet the need for any LED indication.
from crow.
There's a dev branch firmware zip over here: https://github.com/monome/crow/suites/11149257223/artifacts/568918905
It includes these v1.1HW changes & the timeline library.
Hope that helps @dndrks !
from crow.
Related Issues (20)
- ASL is running at half speed HOT 4
- improve & add documentation HOT 6
- when using `input.mode = 'clock'` sense start/stop
- memory allocation issues with new modules HOT 1
- 'make -j' build successful, but with errors HOT 2
- Updates needed for Disting EX ii support
- `CROW.Q1` gives `ii lines are low` when 2 crows are on bus HOT 4
- ASL modulations HOT 1
- Clear script by self-patching on boot HOT 1
- ceify the metro lib HOT 3
- Clock & Metro libraries are slightly out of sync
- v4.0.2RC fails when accessing `input` in druid HOT 2
- Firmware compilation fails under Docker (Windows) with missing GLIBC_2.27 HOT 5
- script clear doesn't seem to purge everything (v4.0.3)
- clock.sync to values less than 1 can cause rapid-firing (v4.0.3) HOT 1
- Crow can fail to boot with Doepfer PSU-3 HOT 3
- Add support for i2c2midi to firmware HOT 7
- tuning issues HOT 2
- simultaneous use of teletype queries and norns crow.send crashes crow HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crow.