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

feat(api): add thermocycler control script #15118

Merged
merged 5 commits into from
May 14, 2024
Merged

Conversation

caila-marashaj
Copy link
Contributor

@caila-marashaj caila-marashaj commented May 7, 2024

Overview

This is a debugging script that allows us to easily communicate with a thermocycler in a similar fashion to can_control or ot3repl. It's just a control loop where the user is prompted to send a thermocycler command, and the script waits for and sends back the thermocycler's response.

You can pass in any gcode command the thermocycler will recognize, and alternatively, there are a few shortcuts for commonly used debugging commands. For example, you can enter ol or cl to open or close the lid.

If there's a need for it in the future, this can likely also be modified to include other modules without that much change to the overall structure.

Review Requests

  • Is this an appropriate file location for this?

Update Notes

This is only meant for use on a robot. Once this is merged I'll write a doc explaining what this is and how to use it.

@caila-marashaj caila-marashaj requested a review from a team as a code owner May 7, 2024 17:32

async def _main():
tc_name = subprocess.check_output(
["find", "/dev/", "-name", "*thermocycler*"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi this will only work on a robot. we get these /dev/ things that are named after modules because we specify udev rules; it won't weven work on a non-robot linux computer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might want to do a glob instead right

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or just document that it's only going to work on a robot if that's all it's intended to do. To make it work off of a robot, you'll have to use e.g. pyserial.tools.list_ports.comports rather than relying on files in particular directories

@caila-marashaj caila-marashaj requested review from a team and sfoster1 May 13, 2024 21:17
@caila-marashaj caila-marashaj merged commit 76360e5 into edge May 14, 2024
20 checks passed
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

Successfully merging this pull request may close these issues.

2 participants