Instructions.java 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. package model;
  2. import java.util.Arrays;
  3. import java.util.List;
  4. /**
  5. * Lists instructions for each object in its own function. Those are functions because otherwise it would only check the first time which string it should take (fill later or not)
  6. * @author Martin Herbers
  7. *
  8. */
  9. public class Instructions {
  10. public static List<String> getSqueezeInstruction() {
  11. List<String> squeeze = Arrays.asList(
  12. "1. \"output.stl\" contains the main object, \"output_conductive.stl\" contains the object's conductive parts. Put \"objectSpecs.txt\" into the Android app.",
  13. "2. Import output.stl into your slicing software and set it's extruder to the one extruding flexible filament.",
  14. "3. Add output_conductive.stl as a part of your object and set it's extruder to the one extruding conductive filament.",
  15. "4. Print.",
  16. "NOTE: It can be difficult to get the flexible part to be leakproof. Try printing at a lower speed and/or using more filament (e.g. Cura: Flow 125%)",
  17. Settings.getSettings().getFill()?
  18. "5. When finished printing fill around 5ml of tap water with, for example, a syringe through the whole into the lower chamber. The needle needs to be straight downwards, otherwise the water will be in the wrong chamber.":
  19. "5. Pause the print at some point and fill around 5ml of tap water with, for example, a syringe through the cone into the lower chamber until it is full.",
  20. "6. If you want to check the object's current state, load the objectSpecs.txt into the Android app and place the object with the bottom on the screen.",
  21. "NOTE: If you're unsure which side is the top and wich one is the bottom: The conductive part with a bevel is the top one.",
  22. "NOTE: If you want to test whether no water got into the wrong chamber, test this object with the app before you start the interaction."
  23. );
  24. return squeeze;
  25. }
  26. public static List<String> getWeightInstruction() {
  27. List<String> weight = Arrays.asList(
  28. "1. \"output.stl\" contains the main object, \"output_conductive.stl\" contains the object's conductive parts. Put \"objectSpecs.txt\" into the Android app.",
  29. "2. Import output.stl into your slicing software and set it's extruder to the one extruding non-conductive filament.",
  30. "3. Add output_conductive.stl as a part of your object and set it's extruder to the one extruding conductive filament.",
  31. "4. Print.",
  32. "5. When finished printing cut off the print support area with e.g. scissors.",
  33. "6. During the test phase, the weight has to come from one flat side of the plate.",
  34. "7. If you want to check the object's current state, load the objectSpecs.txt into the Android app, place one plate on the touchscreen (ideally the one where the conductive part stands out more) and put your finger on the top plate's conductive part. You can use some pressure to counteract the support's spring effect.",
  35. "NOTE: If you want to test whether the conductive bars already have a connection, test this object wit hthe app before you start the interaction."
  36. );
  37. return weight;
  38. }
  39. public static List<String> getTemperatureMeltInstruction() {
  40. List<String> temperatureMelt = Arrays.asList(
  41. "1. \"output.stl\" contains the main object, \"output_conductive.stl\" contains the object's conductive parts. Put \"objectSpecs.txt\" into the Android app.",
  42. "2. Import output.stl into your slicing software and set it's extruder to the one extruding non-conductive filament.",
  43. "3. Add output_conductive.stl as a part of your object and set it's extruder to the one extruding conductive filament.",
  44. "4. Print.",
  45. Settings.getSettings().getFill()?
  46. "5. When the print is finished, place the object on the side that is standing out, so that the side with only the conductive point is on top and the hole is on the side. Now fill some water through that hole with e.g. a syringe and freeze it either in the same position without tilting it or with the hole on the bottom. It can be helpful to seal the hole with a bit of glue.":
  47. "5. Before the chamber without conductive parts gets closed, pause the print and fill in some ice or water. When you're done filling resume the print. If you chose water, freeze it with the same orientation.",
  48. "6. When the water is frozen, flip the object so the conductive point is on the top side. In this position the molten water will flow into the other chamber.",
  49. "7. If you want to check the current state of the object, load the objectSpecs.txt into the Android app and flip the object again (conductive part on the bottom). Let the object warm up for at least 30 minutes in this position. After that the state can be checked with the Android app.",
  50. "NOTE: If you're unsure which side with a conductive point is the top/bottom one and which is the one on the side, check for the printing direction. The top/bottom one is much smoother.",
  51. "NOTE: If you want to test whether no water got into the second chamber, test this object with the app before you start the interaction"
  52. );
  53. return temperatureMelt;
  54. }
  55. public static List<String> getTemperatureFreezeInstruction() {
  56. List<String> temperatureFreeze = Arrays.asList(
  57. "1. \"output.stl\" contains the main object, \"output_conductive.stl\" contains the object's conductive parts. Put \"objectSpecs.txt\" into the Android app.",
  58. "2. Import output.stl into your slicing software and set it's extruder to the one extruding non-conductive filament.",
  59. "3. Add output_conductive.stl as a part of your object and set it's extruder to the one extruding conductive filament.",
  60. "4. Print.",
  61. Settings.getSettings().getFill()?
  62. "5. When the print is finished, fill around 8ml of tap water through the hole with, for example, a syringe. Ideally a bit of water comes back out. You can seal the hole with some glue.":
  63. "5. Before the chamber without conductive parts gets closed, pause the printing and fill it with water. The more water the better it will work.",
  64. "6. When the print and filling finished, the object can be used instantly. When it freezes, the water ice will expand and break through the conductive wall. When melting again, the water will flow through the broken wall.",
  65. "7. If you want to check the current state of the object, load the objectSpecs.txt into the Android app and let the object warm up for at least 30 minutes. After that the state can be checked with the Android app.",
  66. "NOTE: If you want to test whether no water got into the wrong chamber (e.g. the wall isn't leakproof), test this object with the app before you start the interaction."
  67. );
  68. return temperatureFreeze;
  69. }
  70. public static List<String> getAccelerationInstruction() {
  71. List<String> acceleration = Arrays.asList(
  72. "1. \"output.stl\" contains the main object, \"output_conductive.stl\" contains the object's conductive parts. Put \"objectSpecs.txt\" into the Android app.",
  73. "2. Import output.stl into your slicing software and set it's extruder to the one extruding non-conductive filament.",
  74. "3. Add output_conductive.stl as a part of your object and set it's extruder to the one extruding conductive filament.",
  75. "4. Print.",
  76. Settings.getSettings().getFill()?
  77. "5. Fill 3ml of tap water with, for example, a syringe into the part without conductive material.":
  78. "5. Before the ceiling gets printed, pause the print and fill 3ml of tap water into the chamber without conductive parts.",
  79. "NOTE: A small derivation of the water volume can change the acceleration at which the state changes, so try to be as accurate as possible.",
  80. "NOTE: Try to hold the object without tilt since a small tilt will change the acceleratoin at which the state changes.",
  81. "6. During the test phase and before reading the object's state try not to tilt it. The object will keep it's state until it gets tilted.",
  82. "7. If you want to check the object's current state, load the objectSpecs.txt into the Android app and place the bottom side of the object on the touchscreen and put your finger on conductive part on the side."
  83. );
  84. return acceleration;
  85. }
  86. public static List<String> getFlipInstruction() {
  87. List<String> flip = Arrays.asList(
  88. "1. \"output.stl\" contains the main object, \"output_conductive.stl\" contains the object's conductive parts. Put \"objectSpecs.txt\" into the Android app.",
  89. "2. Import output.stl into your slicing software and set it's extruder to the one extruding non-conductive filament.",
  90. "3. Add output_conductive.stl as a part of your object and set it's extruder to the one extruding conductive filament.",
  91. "4. Print.",
  92. Settings.getSettings().getFill()?
  93. "5. After the print finished fill around 4ml of tap water with, for example, a syringe through the hole into the middle part. Try holding both the object and the syringe straight upwards so no water can accidently get into the outer chamber. You can seal the hole with some glue.":
  94. "5. Before the ceiling gets printed, pause the print and fill 4ml of tap water into the middle chamber.",
  95. "6. During the test phase, small tilts won't change the state. Only around 90-270° tilts will change the state.",
  96. "7. If you want to check the current state of the object, load the objectSpecs.txt into the Android app and place the object on the screen. Put your finger on the conductive part on the side.",
  97. "NOTE: If you want to test whether no water got into the wrong chamber, test this object with the app before you start the interaction"
  98. );
  99. return flip;
  100. }
  101. public static List<String> getTiltInstruction() {
  102. List<String> tilt = Arrays.asList(
  103. "1. \"output.stl\" contains the main object, \"output_conductive.stl\" contains the object's conductive parts. Put \"objectSpecs.txt\" into the Android app.",
  104. "2. Import output.stl into your slicing software and set it's extruder to the one extruding non-conductive filament.",
  105. "3. Add output_conductive.stl as a part of your object and set it's extruder to the one extruding conductive filament.",
  106. "4. Print.",
  107. Settings.getSettings().getFill()?
  108. "5. After the print finished fill around 2ml of tap water with, for example, a syringe through the hole into the part further away from the electrodes.":
  109. "5. Before the ceiling gets printed, pause the print and fill 2ml of tap water into the chamber without conductive parts.",
  110. "6. During the test phase, small tilts won't change the state. Only around 45-135° tilts will change the state.",
  111. "7. If you want to check the current state of the object, load the objectSpecs.txt into the Android app and place the object on the screen. Put your finger on the conductive part on the side.",
  112. "NOTE: If you want to test whether no water got into the wrong chamber, test this object with the app before you start the interaction"
  113. );
  114. return tilt;
  115. }
  116. //ADD CODE HERE FOR ADDITIONAL INTERACTION
  117. //New function that returns the textual instructions as a List of Strings
  118. }