Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Teensy 3.2 - Button push to run Batch/VBScript

  1. #1
    Junior Member
    Join Date
    Nov 2017
    Posts
    3

    Teensy 3.2 - Button push to run Batch/VBScript

    Hello all - I'm a total noob to the Teensy and Arduino platform, and all my programming experience is in VBScript and PERL. I have a project where I want to use a Teensy 3.2 connected to a mini PC running Windows 10. I have the Teensy 3.2 pinned version and a breadboard, to which I want to connect a simple button. When the button is pressed, I want to initiate a script that does a printscreen, save to file, and send to printer. I then want to wait 5 seconds and retransmit the button push, because this is actually sitting in between the button and the original destination that already has a function applied to the button signal. Any ideas/suggestions? Thanks!

    T

  2. #2
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,574
    There are probably two choices. One is to have some form of code running on the PC that listens to serial traffic from the teensy and does the required actions (no idea which methods allow a screen capture, given the security concerns with that).

    Other method is to look at the teensy keyboard tutorials. A teensy can fire a sequence of key strokes, so if you can come up with a sequence of keyboard commands that do what you want you can fire those on the button press . While easier to do initially this will fail completly in all sorts of ways if the initial state of the PC changes, say capslock being pressed or the windows menu already being open.

    If going the keyboard route, make sure you have a button that halts keypresses, since all sorts of ways you can do exciting things to your work with a misfiring keyboard. Anything that manages something like select all, cut, save changes, close will ruin your day. Even just 10k letter As can be tedious to fix.

  3. #3
    Junior Member
    Join Date
    Nov 2017
    Posts
    3

    Willing to hire help....

    If anyone would like to help me with this project, please let me know. I have a $500 budget. Thanks!

  4. #4
    Junior Member
    Join Date
    Nov 2017
    Posts
    3
    Thanks u/GremlinWrangler for your response. Any suggestions on where to get started on a serial PC connection? I imagine Visual C++ would be OK?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •