Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional simulator #23

Open
NewbieXII opened this issue Sep 13, 2022 · 20 comments
Open

Conditional simulator #23

NewbieXII opened this issue Sep 13, 2022 · 20 comments

Comments

@NewbieXII
Copy link

can u create a simulator with condition where only specific device can be found in the workspace?
help me out :(
i have been doing code and i can't perfect it. :(

@kazuhikoarase
Copy link
Owner

Hi,
It mean that you don't want full devices?

@NewbieXII
Copy link
Author

NewbieXII commented Sep 13, 2022

your system is ok... it was awesome.. but it occur to my mind what if i want a quiz based instead freestyle simulating.
i just want to add a condition based where if the connection is correct or not correct based on given question... you know like teaching based.

@NewbieXII
Copy link
Author

sorry ..just newbie in this programming but i want to become programmer just like you

@kazuhikoarase
Copy link
Owner

kazuhikoarase commented Sep 13, 2022

Could you send me a drawing your imaging?

@kazuhikoarase
Copy link
Owner

It can paste here like this.
image

@NewbieXII
Copy link
Author

NewbieXII commented Sep 13, 2022

hmm...... like this
GIven Instruction is here

device here and workspace is here

on the bottom of these there is button where will dictate if your work in your working space is correct based on the given instruction.
if the instruction is not follow then the it will trigger that there is something wrong to your work
like you are answering a question to a quiz. if your answer is correct then you can go to the next number if your answer is wrong then you need to check your work... like that .. i hope you understand.. sorry for my english

@NewbieXII
Copy link
Author

Untitled

example in given instuction... you need to put LED,DC, and connect them. if the user click the button and follow the given instruction and pop you are correct then the user do another one. just like that hehe

@NewbieXII
Copy link
Author

sorry for my english i hope i deliver my message correctly.. i really sorry.

@kazuhikoarase
Copy link
Owner

kazuhikoarase commented Sep 14, 2022

What's this button's label? I could not read it.
SVD ?
image

@NewbieXII
Copy link
Author

that button is submit

@kazuhikoarase
Copy link
Owner

Is your image as follows?

Step1. First exam.
image
Step2. User solve it.
image
Step3. Confirm it.
image
Step4. Go to next exam.
image

@NewbieXII
Copy link
Author

yeah like that... can i have the code? PLEASEEE :(((

@NewbieXII
Copy link
Author

i have been struggle in doing that ... :( help mee please.

@kazuhikoarase
Copy link
Owner

Current source is here.
But it's hard to implement to check why a current circuit is correct.

<!doctype html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <script type="text/javascript" src="simcir.js"></script>
    <link rel="stylesheet" type="text/css" href="simcir.css" />
    <script type="text/javascript" src="simcir-basicset.js"></script>
    <link rel="stylesheet" type="text/css" href="simcir-basicset.css" />
    <script type="text/javascript" src="simcir-library.js"></script>
    <style>
.frame {
  padding: 16px;
  display: inline-block;
  border: 1px solid #000;
}
.instuction {
  padding: 4px 8px;
  margin: 8px 4px;
  display: inline-block;
  background-color: #ccc;
  font-size: 16pt;
}
.button {
  font-size: 16pt;
}
    </style>
    <title></title>
  </head>
  <body>
  <div class="frame">
    <div class="instuction">Instuction here</div>
    <div class="simcir">
    <!-- paste here your circuit data -->
{
  "width":400,
  "height":200,
  "showToolbox":true,
  "toolbox":[
    {"type":"DC"},
    {"type":"LED"}
  ],
  "devices":[
  ],
  "connectors":[
  ]
}
    </div>
    <button class="button" onclick="alert('Correct!')"> SUBMIT </button>
  </div>
  </body>
</html>

@JamesNewton
Copy link

Is it enough to check that it gives the correct output for all possible inputs?

@JamesNewton
Copy link

I am interested in your simulator having this ability as it would be useful for teaching. Like NandGame. But with your nicer user interface.

@kazuhikoarase
Copy link
Owner

@JamesNewton
Where is lacking of user interface?

@NewbieXII
Copy link
Author

NewbieXII commented Sep 15, 2022

yeah.. so hard :(... that is why i ask you ? hehehe cause i doing it for a month to do that... i have a idea,,, how about we use can the connector as data finder?... something like this... we just want to know that the device is in the workspace.

"devices":[
],
"connectors":[
]
can we use these two as data finder?...

@JamesNewton
Copy link

@kazuhikoarase I'm saying your user interface is better.

@NewbieXII
Copy link
Author

i need a condition to know that can tell what inside of the workspace. you know like evaluating what inside of the breadboard.
:(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants