Avatar for bertjerred

bertjerred

Member since Sep 2021 • Last active Dec 2021
  • 1 conversations
  • 17 comments

Beginner Espruino user.
English instructor and hobbyist electronics/digital music maker.
chj3.com

Most recent activity

  • Avatar for bertjerred

    Hi everyone! I fired up an older project today that had been working perfectly, and then (maybe after a firmware update?) I received a similar error. Can anyone please help me understand what I am looking at here?

    Here's the first part of my .BOOTCDE:

    Modules.addCached("MPR121",function(){ex­ports.connect=function(a,g,d){d=d||{};le­t b=d.address||90,f={read:c=>a.readFrom(b,­c),write:c=>a.writeTo(b,c),touched:funct­ion(){a.writeTo(b,0);var c=a.readFrom(b,2);return c[1]<<8||c[0]},setThresholds:function(c,­h){for(var e=0;24>e;e+=2)a.writeTo(b,65+e,c),a.writ­eTo(b,66+e,h)}};a.writeTo(b,[94,0]);a.wr­iteTo(b,[43,1]);a.writeTo(b,[44,1]);a.wr­iteTo(b,[45,0]);a.writeTo(b,[46,0]);a.wr­iteTo(b,[47,1]);a.writeTo(b,[48,1]);a.wr­iteTo(b,[49,255]);a.writeTo(b,[50,2]);f.­setThresholds(15,
    8);a.writeTo(b,[92,d.config1||32]);a.wri­teTo(b,[93,d.config2||32]);a.writeTo(b,[­94,143]);g&&g(f);return f}});

    And here's my error message (screenshot):

    Any help is greatly appreciated! :)

  • in Pico / Wifi / Original Espruino
    Avatar for bertjerred

    I've never seen anyone draw their circuit in the comments before and I love it so much.

  • Avatar for bertjerred

    @allObjects you are a Godesend! I'm going to stop asking questions for a while and go try to build build build with all of this magnificent teaching. You (and others on this thread) are really very good educators and I respect the levels of complexity.

    Would love to see some pictures (when the mood strikes you) of things you've made - not that I've ever ventured into ham, but it is intriguing. The closest I've come is an SDR dongle as a listener/explorer of frequencies...

  • Avatar for bertjerred

    Wow, thank you. So many things here for me to digest. As always, please forgive my lack of experience, but 1) these are functions within a function... each assigned to 1-bit changes? Is that right? and 2) Espruino (and JavaScript) interpret 'on the fly,' so to speak?

    And 3) if I was using, say, a polling version for MPR121 key strokes successfully (e.g., I can play a C# for as long as I hold down the appropriate key), and I wanted to use an ADC (potentiometer) to alter PWM in realtime while the note is playing continuously, could I?

    I'm not sure I fully understand the order in which the code gets interpreted by the Espruino, and therefore where to embed my "mod wheel" potentiometer loop. Or maybe I just get confused by loops within loops...

    In any case, I sure do appreciate all of this, @allObjects!

  • Avatar for bertjerred

    Oh I see - maybe they would be part of the subsequent "If..." section...?

  • Avatar for bertjerred

    @SimonGAndrews @allObjects thank you so much. This looks fun, and I feel a wave of new questions percolating. But to be sure, I first have some testing and experimenting to do. I'm going to try the IRQ method.

    @SimonGAndrews, with your 12-key project, do you happen to remember where you embedded your key-specific functionality? For example, did they live inside your touchedIRQ() function? And were they, like, "If keys == 3, do something?"

  • Avatar for bertjerred

    Oh wow - great! Thank you for this as well. I imagine it's hard to predict where people come in from when they're trying out a project, but I guess if you know where they end up, the "commonly referenced links" is pretty handy. I'll be checking that out soon for sure.

    As a side note, my day job is writing instructor at a small college in Syracuse - and one of the things that interests me is hardware/software documentation online. A fascinatingly complex endeavor - and not sure if it could even exist outside of group efforts and the thoughtfulness of people like yourself who contribute to a community's efficiency.

  • Avatar for bertjerred

    That is a useful insight! The device I'm working on will be plugged in via USB the whole time, but future projects might be portable... thank you!

Actions