Python Forum
Stop/continue While loop block
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stop/continue While loop block
#41
Quote:he polling speed is limited by the hardware on each neotrellis board, Not by the controlling processor, no matter how fast it is, so the pi zero (or any other processor, like the M4, is more than adequate A button can only physically be pressed as fast as a human finger can move).

The reason I have chosen the Rasp Zero over Arduino is that I needed more speed to process data coming from serial, not so much for the i2c side.

Quote:2. Each individual board on the neotrellis fires an interrupt as soon as [b]Any[/] key is pressed on that board. This interrupt along with the board Id and x, y id is immediatly sent over the I2c bus to the controlling processor. This is the ideal setup as you don't have to discover which board is sending the button press signal. Again the time needed to process on the controlling processor is trivial when human intervention (the button press) is involved.

Thats what I dream of...


Quote: (I have to fit this into my schedule, which, although being retired, is quite full).

Sorry if I sounded demanding, wasnt my intetion at all.

Let me know if/When you have news,

Thanks.
Reply
#42
Quote:The reason I have chosen the Rasp Zero over Arduino is that I needed more speed to process data coming from serial, not so much for the i2c side.

This will not buy you much, as stated:

Quote:My Quote: The polling speed is limited by the hardware on each neotrellis board, Not by the controlling processor, no matter how fast it is, so the pi zero (or any other processor, like the M4, is more than adequate A button can only physically be pressed as fast as a human finger can move).

I have done this using fairly slow TI msp430 processors and also had separate routines for driving LCD display's, a lithium ion battery charging, etc. all with this tiny MCU.

Quote:That's what I dream of...

What I intend to do.

Quote:Sorry if I sounded demanding, wasnt my intetion at all.

didn't think it was, I'm only warning about my turtle crawl.
Reply
#43
Quote:This will not buy you much, as stated:

Im building a Sequencer for a synthesizer, sometimes I have to change, if not all, a large portion of the 512 led/buttons as fast as possible. The Arduino Mega board took much more time to parse the position and the 3 RGB numbers coming from serial (e.g. 43 255 100 255).

Quote:didn't think it was, I'm only warning about my turtle crawl.

No rush. Im working on this for many months, so im not axious anymore.
Reply
#44
I sent you a personal mail with some comments about music that I didn't want to broadcast.

I'm still waiting for some $0.95 cables which were supposed to arrive yesterday but did not, nor today either.
Looks like I'll have to break out the breadboard.

The slow processing speed is the way the board is being accessed, not the processor.
The board has to be wired differently in order to use interrupt processing. There is an example on the AdaFruit site

When wired properly, all connections should be made through a single I2C connection for all boards.

I am assuming that this can be done, output should be instantaneous.

The code that you use is polling which is notoriously slow.
Reply
#45
Hi. I try to answer through PM but I get this message (I have already activated the acount).

Quote:You do not have permission to access this page. This could be because of one of the following reasons:
Your account has either been suspended or you have been banned from accessing this resource.
You do not have permission to access this page. Are you trying to access administrative pages or a resource that you shouldn't be? Check in the forum rules that you are allowed to perform this action.
Your account may still be awaiting activation or moderation. (Resend Activation Code)
You have accessed this page directly rather than using appropriate forms or link.

You are currently logged in with the username: 'Moris526'

Your son is quite a craftsman with Reason.
The results he gets with Nothing is Recorded are very intresting. Im into experimental music. I like Modern Meditation too.

I can relate with him.
I started playing the Piano, and then started with Reason too, but I moved to Ableton around Reason version 3, so I dont know all those new instruments.

Then I had to move to more lucrative and boring things, but I try to keep connected to music with the time I have left.

Ableton has MAX/MSP (from Cycling 74) built in. From Max (inside Ableton) I send data via serial to Raspberry to control the button board, and then data from button pressed back to Ableton.


Quote:When wired properly, all connections should be made through a single I2C connection for all boards.
This is how I have it wired


I dont think I understand this

Quote:The code that you use is polling which is notoriously slow.

Is there more than one way to read the board?
Reply
#46
oops, I think I turned off my PM as I was getting a lot of unwanted mail back when I was working on a contract.
Not sure I will be taking any more contract work, so perhaps I will turn on a gain later this evening.

My son went to Berklee, but later went back to school to get a medical degree (Pharm D) . He still is still very much involved with music, probably the same as you.

Quote:I don't think I understand this
I'm pretty sure I do, but not certain ... more tomorrow

Quote:Is there more than one way to read the board?
I think (hope) so, Got my cables today, so will finally have answer tomorrow (baring any unforeseen circumstances).
you should be able to drive the I2C signal with an interrupt. I need to experiment. Also more tomorrow.
Reply
#47
I don't have the perseverance that I used to have. Been at it since 6 A.M. (EST) not much progress. Will begin again either later this evening or tomorrow.

I'm havinf trouble finding supporting code for imports specifically board, and busio
Reply
#48
Hey man.

No need to rush or even keep at it if it is too much work. You were careful enough not to promise a positive result.

I know I dont have to say it but feel free to let it go. Already gave me more than enough atention.
Reply
#49
Quote:I know I dont have to say it but feel free to let it go. Already gave me more than enough atention.
It has become a challenge that I must complete.
It would take something quite serious for me to give up yet.

I am attempting to connect the neotrellis directly to my Computer using the MCP2221.
The blog here: https://learn.adafruit.com/circuitpython...th-mcp2221
states that this can be done:
Quote:This guide will show you how to use an MCP2221(A) to connect to I2C sensors and breakouts from your desktop PC running Windows, Mac OSX, or Linux. The MCP2221 also allows for general purpose digital input and output (GPIO) for things like buttons and LEDs, analog to digital conversion (ADC), and digital to analog (DAC).

The cool part about this is that you can then use any of the CircuitPython Libraries that have been written for the numerous I2C sensors and breakouts. You can bring that data directly into your PC for any kind of powerful analysis or presentation.

Since the last email, even though I said I was going to quit for the day, i did not.
I have located all of the github code that should be needeed to examine and see how it's done.

The MCP2221 board connects to the PC through USB (that is working). The MCP2221 board has a 4 pin I2C which in addition to the standard SDA and SCL data lines also supplies V+ and Ground which should be able to power up the Neotrellis.

I have connection between PC and MCP2221 working using putty on PC. I'm not yet seeing signals from the neotrellis, but that should be something simple, and will 'discover' what is is tomorrow.

When all is said and done, I believe this will work with just the MCP2221 board and the neotrellis, no need for a Pi, aduino or any other intermediate device.

Then, the goal is to create an event function that's mapped to a matrix containing a cell, for each button, that will hold the address of the function associated with that button. This for any button, on any board, differentiating between each one.

Now Looking entirely possible.

more later.
Reply
#50
Quote:It has become a challenge that I must complete.
(I hold my fist tight)

If you can do it, I was thinking maybe I could pay you with bitcoin.

Quote:hen all is said and done, I believe this will work with just the MCP2221 board and the neotrellis, no need for a Pi, aduino or any other intermediate device.

could I still use the Rasp if I wanted?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Anyway to stop a thread and continue it? dimidgen 2 338 Mar-18-2024, 10:53 AM
Last Post: DeaD_EyE
  Button to stop while loop from another script Absolutewind 5 902 Sep-25-2023, 11:20 PM
Last Post: deanhystad
  get out of while loop and stop repeat Frankduc 11 2,986 Apr-26-2022, 10:09 PM
Last Post: deanhystad
  while loop will not stop looping TheTechRobo 5 3,738 Apr-20-2020, 01:47 PM
Last Post: TheTechRobo
  for loop stumbling block YoungGrassHopper 8 4,513 Sep-11-2019, 03:34 PM
Last Post: YoungGrassHopper
  while loop stumbling block YoungGrassHopper 5 3,303 Sep-09-2019, 08:36 PM
Last Post: YoungGrassHopper
  How to continue in loop until correct input received sunnyarora 10 9,930 May-04-2019, 02:37 PM
Last Post: Yoriz
  Can I Control loop with Keyboad key (start/stop) Lyperion 2 3,344 Jul-28-2018, 10:19 AM
Last Post: Lyperion
  build a list (add_animals) using a while loop, stop adding when an empty string is en nikhilkumar 1 8,896 Jul-17-2017, 03:29 PM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020