SLAA891B April   2019  – February 2020 MSP430FR2512 , MSP430FR2512 , MSP430FR2522 , MSP430FR2522 , MSP430FR2532 , MSP430FR2532 , MSP430FR2533 , MSP430FR2533 , MSP430FR2632 , MSP430FR2632 , MSP430FR2633 , MSP430FR2633 , MSP430FR2672 , MSP430FR2672 , MSP430FR2673 , MSP430FR2673 , MSP430FR2675 , MSP430FR2675 , MSP430FR2676 , MSP430FR2676

 

  1.   Automating Capacitive Touch Sensor PCB Design Using OpenSCAD Scripts
    1.     Trademarks
    2. 1 Introduction
    3. 2 Getting Started
      1. 2.1 Prerequisites
      2. 2.2 Workflow
      3. 2.3 Creating a Sensor
      4. 2.4 Output DXF
      5. 2.5 Batch Files
    4. 3 Slider
    5. 4 Wheel
    6. 5 Curved Slider
    7. 6 Touchpad
    8. 7 PCB CAD Tool
    9. 8 Summary
  2.   Revision History

Batch Files

Batch files automate the process of generating one or more DXF output files, one for each sensor element. Using the example wheel.bat batch file, all four elements are rendered and output into separate DXF files. The contents of the wheel.bat file are:

openscad.exe -o wheel_element_0.dxf -D "element=0" wheel.scad openscad.exe -o wheel_element_1.dxf -D "element=1" wheel.scad openscad.exe -o wheel_element_2.dxf -D "element=2" wheel.scad openscad.exe -o wheel_element_3.dxf -D "element=3" wheel.scad

When creating a slider or wheel sensor that has more or fewer than four elements, it is suggested to create a copy of the slider or wheel batch file and modify it to match the number of elements specified in the new script. For example, if you create a 3-element slider, copy slider.bat and give it a new name, such as slider3.bat. Edit this new file so it renders and outputs 3 elements, as shown in this example:

openscad.exe -o slider_element_0.dxf -D "element=0" slider.scad openscad.exe -o slider_element_1.dxf -D "element=1" slider.scad openscad.exe -o slider_element_2.dxf -D "element=2" slider.scad

To execute a batch file, open a command window and navigate to the directory where the script files are located. Type the name of the batch file including the .bat filename extension (for example, "slider3.bat").