there should be plenty of room still!

there isn’t anything else for ansible but if you just need to see how interaction with arc is programmed you could take a look at the following white whale examples:

  • this was meant to be a template for somebody developing an arc firmware for white whale. it really needs to be updated but might be a good starting point, check the comments throughout the code.

  • this is orca code before grid support was added, so just arc. this is also for white whale, so you have to be aware of hardware differences.

2 Likes

I really really hope you succeed at this!

1 Like

@scanner_darkly , thanks!! That first link you provided is great, the comments help a lot!! I’ll be looking at both of these the next couple days

@jasper_ryder , I definitely can’t promise anything but I’ll see what I can do :slightly_smiling_face: if I’m unsuccessful and enough people want it I’m sure we can look for community development

2 Likes

no problem, will be happy to help with any specific questions once you get started.

1 Like

So I started a Hello World program by modifying the ansible_arc.c file, I’ve uploaded my code here:

Unfortunately I hit some snags when compiling


Do I have to declare the functions I’m adding in another file besides ansible_arc.c?
Maybe I’m biting off a bit more than I can chew here.

I’ll maybe have some more time this week to look into this a little more
@scanner_darkly would you have any advice on how to proceed?

sorry, was away, having a look now.

you do need to declare functions in either ansible_arc.h (or if you declare in ansible_arc.c do it before they are called or assigned). i tried a quick fix but there are other valid compilation errors - where do you define mArcLevels? that should go to main.h (see where mArcLevels is defined).

a good way to approach this might be making smaller changes and then trying to compile after each step.

1 Like

I’ll declare my functions in ansible_arc.h and maybe see what is unnecessary of my code and delete that, incrementing slowly, thanks!

this is kind of a tangent, but it would be really awesome if the Ansible firmware was structured a little more flexibly so that additional apps could be added, but as it is, its sort of hard-coded for two apps in either hardware mode.

Is it? Taking a look at the code where it switches modes it looks to just be calling a case
image

What I attempted to do was to add another case
image

I’m not actually sure if this will work/ if it’s proper

ah… maybe its not as hard-coded as i thought… i guess what would be really killer is if there was like a boilerplate template for a grid or arc app on ansible that lived in its own .c/.h files and you could just start modding it to begin building your own app.

4 Likes

That would be really nice!

i don’t think there is a specific limitation on number of apps, it’s just a matter of adding all the appropriate handlers, grid press/encoder rotation processing and LED rendering. a boilerplate template would be great! (would love to do it if i had the time).

1 Like

So I’ve worked on it a bit more and I’ve gotten less compile errors with quite a bit of clean up


If anyone else wants to jump in at this point to help development that would be greatly appreciated, I’ve uploaded my changed files here: https://github.com/acbakhit/AnsibleArcHelloWorld

you need to declare hello_state structure in ansible_arc.h and uncomment https://github.com/acbakhit/AnsibleArcHelloWorld/blob/master/main.h#L56

it’s basically a structure that should hold any state variables you want to persist in flash (including presets). take a look at levels_state_t and cycles_state_t as an example. there are other errors but let’s start with this one.

another thing that might be helpful - i’m working on porting earthsea to ansible, and this commit shows you everything you need to do in order to add a new app. it’s for grid but might still be useful (and it includes a support for presets). once something like that is set up you basically just need to write code to process key presses and update LEDs.

3 Likes

Thanks!! I’ll be looking into your earthsea/ansible port. On a side I was getting main.h compile errors when hello_state was uncommented and it was due to something regarding the i2c address, but I’ll look at your port and see how you handle this-- I really appreciate your help with this!

1 Like

So this project has kinda fallen to the wayside for me since starting a new job, I just haven’t had the free time to keep working on it
@tehn sorry to ping you but it seems like there’s a decent amount of interest in this (and it seems like it would be a very good addition to Ansible), is there a chance that this can be a feature request for future Ansible firmware?

1 Like

have you done any more work on porting this over to ansible? i know youre probaby busy. thought id check :smile:

2 Likes

i have no idea how to do it, but maybe this is something that could be handled by crow? it has 4 outs…

This is something I still think about but just haven’t had the time and honestly the learning curve is a bit too steep for me to do in a short period of time-- but I still stand by that this would be a really good feature addition to the Ansible + Arc combo

5 Likes