They’re always just a flag away.

2 Likes

So I’m not sure if you’re using all of @szymon_k’s code for the Untz or if you’ve modified it, but…

I made a series of changes to his code when I started my teesny-grid project.

You might run a compare of the processSerial function here
https://github.com/okyeron/itsagrid-64-128/blob/master/itsagrid/itsagrid.ino

I also fixed some issues with extra data bytes not getting accounted for in a newer version when i mplemented varibright, but this doesn’t seem related to your issues.

1 Like

Hi @greaterthanzero

thanks for getting back to me.

Yes: I did use the original grid studies. The first example (it is grid_studies_2.js) does contain a typo, which caused, that I did not get back a correct LED value, but that I could easily change once spotted:

// Original grid_studies_2.js, downloadable at: https://monome.org/docs/grid-studies/nodejs/files/grid-studies-nodejs.zip
// set up key handler
  grid.key((x, y, s) => console.log(`key received: ${x}, ${y}, $[s}`));
// wrong parenthesis --->                                       ^

To Syzmon’s node-serialosc: Yes, this might be the point of failure. I did contact him and he will be so kind to check the grid-studes-examples with his DIY-monome. Besides: What I got from him is 1. the Arduino code to make the Unztrument available as a monome. The other is his node-serialosc implementation to avoid having to flash the FTDI-chip. Nothing else. On top of that just the grid-studies.

One more thing (just for the sake of completeness): As I mentioned, I can run Ramón’s monode with a pretty sophisticated example without problems. This does actually point to the grid-studies.

But I know, things are complex and intertwined. So eventually I will have to be able to read, debug and change the code on my own (and this not only on the level of the examples). That’s why I began working my way through Eloquent Javascript which seems a good point to start; my project for 2019. This might eventually lead to being able to either fix my problems with the grid-studies or to integrade the monode code as you are proposing.

I am not in a hurry.

Thanks for you help, again.

PS.: I would have appreciated a note from the one who moved my post as to why that was moved here (as I do not know, who it was I am just mentioning @dan_derks as the first moderator in the list).

1 Like

I just refreshed my memory on this…

So Syzmon’s code has an issue where if you are getting more than a singe 8x8 “quad” of data, the additional bytes will cause led problems. This is only really a concern if your application is sending out data for a 256/512 grid.

So I added something like the following around the 0x1A for loop here

if (readY == 0){  // only loop if y = 0 since we only have 1 or 2 quads with 64/128 buttons
///
} else {
  for (int q = 0; q<32; q++){
     readInt(); // consume extra bytes for quads 3/4
  }
}

apologies for any confusion! i’m unsure what which specific mod moved it, so always feel free to message the moderator group directly with any questions :slight_smile: we are a small team with best intentions

1 Like

Ok, thanks. As a ‘fresher’ I wasn’t sure about the conventions here. But I will ask directly next time.

1 Like

Ok, I will check this out during the next days as I am currently travelling…

Thanks again @okyeron,

I checked that but it does not seem to have to do anything with the behaviour I described. Which is no wonder, because you already mentioned that it applies only if using a 256/512 grid (mine has 64 LED). Anyway, it was worth a try.

1 Like

Well it was worth a shot

FWIW - the behaviour I was seeing caused led errors on my 128 because the host app was sending out data for up to 256 leds. Thus I thought this might be related since it seems your host app code may be doing something strange.

Yes, definitely! I’ll keep on searching and will report in case I find something. Might be helpful to others as well.

node-serialoscd has been updated. As far as I had time to check the monome grid studies do work now for me.

2 Likes

thanks for posting!!!
working on a moduinome atm
cheers

1 Like

Hi!
Hope someone can help me out on this one.
Unfortunately over the last years i had to let my 3 monome go.
Lately i have had some spare time and i have build and Untz and a Hella Untz.
Im trying to use them as monome emulators. I have read over this post several times, and the closest i have come to getting my Untz instruments working with the monome apps was with monomecereal.
I do see feedback on monomecereal.maxpat but as i say the untz is not seen /recognized by any monome apps.
I have tried all ( that i can think of) githubs pages that use the untz as a monome simulator.




Its actually when i used the oontzmefirmware128.ino on this last page i have feedback from my untz on to monomeceral (both ways)

I was wondering if some one could point me out to any patches / sketches that could make my untz instruments talk to the monome apps.

Any help will be much appreciated, cheers!

Hey, I’m using mine diy-monome with my own node-serialoscd (https://github.com/szymonkaliski/node-serialoscd) and it works with most of the monome max/msp / max4live things I tried :slight_smile:

Hi! Thanks for the reply and support.

Im going to check it when i get home,

The instructions on your github are for installing from console (mac)?

So i need to download the files and do a cd to the directory and then run:
npm install -g node-serialoscd

And to use it run:
node-serialoscd MONOME_TTY

Do i need to uninstall the official seriaosc?

Sorry im a noob at coding!

Thanks a lot

So you need to install node and npm first, and then run npm install -g node-serialoscd; I don’t think you need to remove the original serialoscd, but you might want to stop it from running, as node-serialoscd needs to connect to the hardware.

Also the command is just serialoscd MONOME_TTY so for example: serialoscd /dev/cu.usbmodem1411

Thanks for your repkly szymon_k.
Unfortunately i had problems during the install on my mojave mac.
I have also tried installing node as per the monome instruction so i must be doing something wrong.
I have had folder permission errors and tried doing sudo commands, but have not got it working so far.
I will let you know how i do, many thanks!

Update:

I have been able to install node and npm on my work windows machine, which is kind of akward :frowning:and also run npm install -g node-serialosd , the windows console reports node-serialcd@@0.0.3 and shows no errors.

Now im puzzled!

In case you haven’t tried it this way, you can install node without using the Terminal

Hi, Thanks for the reply.
I managed to install node as per the instructions on the webpage linked, cheers.

I got this message on the terminal:

Thopa-Mac-Olds-MacBook-Pro:~ thopa_mac_old$ sudo npm i -g npm

⸨░░░░░░░░░░░░░░░░░░⸩ ⠧ rollbackFailedOptional: verb npm-session fa56b276ceb6ebd

/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js

/usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js

  • npm@6.9.0

updated 1 package in 17.746s

Thopa-Mac-Olds-MacBook-Pro:~ thopa_mac_old$

Thopa-Mac-Olds-MacBook-Pro:~ thopa_mac_old$

now… when i try:

npm install -g node-serialoscd

At first i get all this errors:

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules

npm ERR! path /usr/local/lib/node_modules

npm ERR! code EACCES

npm ERR! errno -13

npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’

npm ERR! { [Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’]

npm ERR! stack:

npm ERR! ‘Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’’,

npm ERR! errno: -13,

npm ERR! code: ‘EACCES’,

npm ERR! syscall: ‘access’,

npm ERR! path: ‘/usr/local/lib/node_modules’ }

npm ERR!

npm ERR! The operation was rejected by your operating system.

npm ERR! It is likely you do not have the permissions to access this file as the current user

npm ERR!

npm ERR! If you believe this might be a permissions issue, please double-check the

npm ERR! permissions of the file and its containing directories, or try running

npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/thopa_mac_old/.npm/_logs/2019-05-29T11_33_33_117Z-debug.log

And if finally it try with the sudo command i get this errors:

Thopa-Mac-Olds-MacBook-Pro:~ thopa_mac_old$ sudo npm install -g node-serialoscd

/usr/local/bin/serialoscd -> /usr/local/lib/node_modules/node-serialoscd/index.js

serialport@6.2.2 install /usr/local/lib/node_modules/node-serialoscd/node_modules/serialport

prebuild-install || node-gyp rebuild

prebuild-install WARN install EACCES: permission denied, access ‘/Users/thopa_mac_old/.npm’

gyp WARN EACCES user “root” does not have permission to access the dev dir “/Users/thopa_mac_old/.node-gyp/10.16.0”

gyp WARN EACCES attempting to reinstall using temporary dev dir “/usr/local/lib/node_modules/node-serialoscd/node_modules/serialport/.node-gyp”

gyp WARN install got an error, rolling back install

gyp WARN install got an error, rolling back install

gyp ERR! configure error

gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/node-serialoscd/node_modules/serialport/.node-gyp’

gyp ERR! System Darwin 15.6.0

gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”

gyp ERR! cwd /usr/local/lib/node_modules/node-serialoscd/node_modules/serialport

gyp ERR! node -v v10.16.0

gyp ERR! node-gyp -v v3.8.0

gyp ERR! not ok

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! serialport@6.2.2 install: prebuild-install || node-gyp rebuild

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the serialport@6.2.2 install script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/thopa_mac_old/.npm/_logs/2019-05-29T11_34_23_600Z-debug.log

Is there a way to install the file locally? I have the one posted on:

https://github.com/szymonkaliski/node-serialoscd

Many thanks!

**Edited: **

I have tried with another package, i get errors but looks like it installed “right”?

Thopa-Mac-Olds-MacBook-Pro:~ thopa_mac_old$ npm install easyimage

npm WARN saveError ENOENT: no such file or directory, open ‘/Users/thopa_mac_old/package.json’

npm WARN enoent ENOENT: no such file or directory, open ‘/Users/thopa_mac_old/package.json’

npm WARN thopa_mac_old No description

npm WARN thopa_mac_old No repository field.

npm WARN thopa_mac_old No README data

npm WARN thopa_mac_old No license field.

  • easyimage@3.1.1

added 7 packages from 5 contributors and audited 7 packages in 55.874s

found 0 vulnerabilities

Sorry for the question, when you say:

Also the command is just serialoscd MONOME_TTY so for example: serialoscd /dev/cu.usbmodem1411

Shall i type erialoscd /dev/cu.usbmodem1411 inside terminal or inside node?

Sorry for the questions, complete noob on this.

Cheers

last edit:

I think im starting to understand node better following the grid studies node install instruction which where successfull.

I created another dir call node-serialoscd and tried running the same process, which fails at the end when trying to sudo npm install --g node-serialoscd

Thopa-Mac-Olds-MacBook-Pro:node_serialoscd thopa_mac_old$ sudo npm install --g node-serialoscd (im confused if its – double or single before g and – - double or single between node and serialoscd, have tried both without sucess.

/usr/local/bin/serialoscd -> /usr/local/lib/node_modules/node-serialoscd/index.js

serialport@6.2.2 install /usr/local/lib/node_modules/node-serialoscd/node_modules/serialport

prebuild-install || node-gyp rebuild

prebuild-install WARN install EACCES: permission denied, access ‘/Users/thopa_mac_old/.npm’

gyp ERR! configure error

gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/node-serialoscd/node_modules/serialport/build’

gyp ERR! System Darwin 15.6.0

gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”

gyp ERR! cwd /usr/local/lib/node_modules/node-serialoscd/node_modules/serialport

gyp ERR! node -v v10.16.0

gyp ERR! node-gyp -v v3.8.0

gyp ERR! not ok

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! serialport@6.2.2 install: prebuild-install || node-gyp rebuild

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the serialport@6.2.2 install script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/thopa_mac_old/.npm/_logs/2019-05-29T12_59_07_671Z-debug.log

Thopa-Mac-Olds-MacBook-Pro:node_serialoscd thopa_mac_old$

A few things-

  1. you should never have to run npm with sudo. If you have directory permission issues you should fix them: https://stackoverflow.com/questions/29468404/gyp-warn-eacces-user-root-does-not-have-permission-to-access-the-dev-dir/29787502#29787502
  2. this command: npm install -g node-serialoscd is telling npm to install the module globally. Doing this should give you the ability to run serialoscd in the terminal.
  3. In this context you can safely ignore WARN messages from npm.
1 Like