How can i reset the inputs?

Hello,
I’d like to know how to reset inputs (by another way than the button), and to register it in a sequence.

I don’t mean to pick, but your question warrants more than one sentence, perhaps several, maybe even an entire paragraph. :slight_smile:

Seriously we’re going to need a lot more information in order to help.

Excuse me…
Firstly, excuse my englis because i’m french.
I work with the Lynwmotion software, for a project at school.
we got two lynx 6 and we try to make them playing a game called “morpion” in french. It’ a two players game, it’a a table with 9 cases, and you have to make a line of three . most of the time, you play with pens and papers, and we want our two robots taking pieces and placing the pieces at the right place (the case we choose). So we’ve already saved 10 sequences, the first one to take the piece (it’s the same each turn), and nine for each cases.

we placed a simple button in order to creat a contact at the A input of the SSC 32 card, and we press it the from one to nine times, in order to choose the right case and the counter works well . and another button to confirm the number (because before pressing 5 imes, for exemple, we don’t want the robot playing the sequence 1 when we press the first time, the robot wait the second button) .
the program is :

if input #2

if counter 1 # > 9
sequence 9
else

if counter 1 # > 8
sequence 8
else

if counter 1 # > 7
sequence 7
else


… you understood


endif
endif
endif

all these lines in a do while with the input 4 when we want to stop the program at the end of the game

HERE IS THE PROBLEM :

after one turn, the counter 1 count 1, or 2, or 3, … or 9, and we would like to reset each turn but we don’t knw how after having work more than one month on it.

In the manual, it’ said that the counter is relative, it means that it’s virtully reset at the end of the sequence, for exemple, if the counter is at 3 and you press 5 times, it doesn’t count 8 but 5. It could be great for us but it doesn’t work, after one or two turn the counter is at more than 9, and it always play the sequence 9.

I hope you understood better, i’m waiting for your answers and solutions !

Hi Julien,

OK, that helps. It sounds like you want to select different sequences for the arm via a pushbutton attached to the A input on the SSC32 board.

I take it you download 9 sequences to the SSC32. You must then tell the SSC32 which sequence to run, right? So do you have another computer to tell the SSC32 which sequence you want? I don’t remember the SSC32 having a function to count button pushes. You can read the value of the input lines. But again, it takes another computer or 'bot board to get the data.

Is there something I’m forgetting? I’m not finding a “counter” in the older SSC32 manual. Do you have the new (V2) SSC32 by chance?

Don’t forget to check if a pull-up resistor is needed on the digital input pin A. Read digital sounds like it would be OK.

Alan KM6VV

No Alan, he’s using RIOS to talk to the SSC-32. It’s the arm program.

Julien, I will ask Laurent to answer this. I’m afraid I don’t know the answer.

RIOS! I should have guessed (it’s an arm). I must have missed that. That’s why I couldn’t find inputs in SEQ. I just looked at the RIOS manual, and there are plenty of references to it. Seems very useful, SEQ could use the input command!

I don’t have RIOS to play with, so I’ll refrain from making further suggestions.

Too bad RIOS can’t be used to control my stepper-driven arm! But stepper motors being incremental devices and R/C servos being absolute devices makes it complicated. I could see writing code for a stepper controller board that would accept SSC32 type commands.

Maybe Laurent is a local call for Julien?

Alan KM6VV

It’s in the queue. :smiley:

[frenchy on]
Salut Julien,

je vais inclure le reset des inputs automatiquement dés qu’une instruction “if” ou “while” devient vrai, cela permettra d’attendre que les compteurs atteignent une valeur “testée” dans la boucle puis de remettre ce dernier à 0 (seulement le compteur “testé” pas les autres).

C’est la solution la plus rapide à mettre en place pour l’instant.
Envoi moi ton email à [email protected] et je t’enverrai une update.
La prochaine version contiendra une commande à insérer dans la boucle pour remettre à 0 un ou plusieurs inputs cela sera un peu plus contraignant car il faudra insérer une instruction dans chaque structure “if” ou “while”, mais cela sera plus souple aussi.

les compteurs sont testé “relativement” mais seulement au démarrage de la sequence list
[frenchy off]

Hello Julien,

i will include an automatic inputs reset when an “if” or “while” test comes true, this will allow counters to increase normaly to a value “tested” in the loop/structure then automaticaly set it to 0 (only the input concerned)

this is the fastest way to solve your issue for now,
send me your email address to [email protected] so i’ll send you an update.
the next RIOS version will include a command to insert in the loop to reset one or more inputs, it will be more constraining because you’ll have to insert one command in each "if’ or “while” loop, but it will be more powerful

the counters are tested in a relative way, but only when starting the sequences list.

Salut Julien,

La nouvelle version est prête pour que tu la testes.
Ça a l’air de marcher ici, envoi moi un email et je te répondrai avec le nouvel exécutable en pièce jointe

Hello Julien,

the new version is ready for you to test,
it seems working fine here, send an email to me and i will reply with the new exe joined.

what a cool topic to learn French eh ?

Thank’s a lots everybody for your help.
I’m now waiting for the update that laureatus is going to send me and it will fix it i think.

but i have another question…

I will present my project to many people at school because it’s a marked, and my collegue and i would lik to bring the table. So we will connect a batery to bring it easily on the desk, but we can’t bring computer… so my question is :

is it possible to save the “lynxmotion rios” program into the memory of the SSC-32 card?

thank’s by advance !

For now no,

using the new “GP” firmware and using an optional 24LC256 or 512 External EEPROM you can store on the SSC-32 some moves and play them automatically…but
for now there’s no support for inputs (trigger) or logical test, it’s a dual player for gait handle purpose, it can play a sequence for an arm but it won’t interract with inputs…
anyway, RIOS can’t export “GP firmware” format sequences for now.

to handle the arm and test inputs, you can use a Botboard + a Basic Atom 28 connected to the SSC-32.

  • RIOS is able to export your project as Basic program that you’ll have to upload to the Botboard/Basic Atom 28 with the (free) Basic Micro IDE
  • the Botboard/basic Atom 28 will be able to test inputs (now it’s better to connect directly them on the BB instead of the SSC-32) and launch the according sequence
  • warning *
    RIOS will export as Basic, only the sequences and a little program to read them all, you’ll have to add the input test and the logical decisions (easy because it will be very similar to the RIOS sequence list you have built)
    i can help to modify the exported project to include the input test and logical decisions.

ok… so, without the bot board you told about, it’s impossible, is it ? It doesn’t matter, it’s not a really big problem cause we just have to do something working well in order to make the other classses working on it at school next year and now it works very well thanks to the program that the one and only programer of lynx motion gave us !!! :slight_smile: i reallly want to send us a movie with the two remote controlled robots playing this game !!!

We just finish this afternoon. last week, we made a lot of links and i worked very well, and today we made a board with conections with inputs, outputs, buttons, ans “octocoupleurs” (it’s said like that in french, it’s a component designed to link outputs and inputs that work in 5 and 6V. Then Studients next year will just have to do links thanks to wires and my friends and i have o do a “instructions” papers, i don’t know if you know what mean…

Whatever, i promise i will send you a movie, the program, pictures, to share an experiment of these arms, amongs a lots.

Thanks everybody, and especially thank’s to you programer !!