<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://phyphox.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Puck.js</id>
	<title>Puck.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://phyphox.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Puck.js"/>
	<link rel="alternate" type="text/html" href="http://phyphox.org/wiki/index.php?title=Puck.js&amp;action=history"/>
	<updated>2026-05-02T05:50:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>http://phyphox.org/wiki/index.php?title=Puck.js&amp;diff=21127&amp;oldid=prev</id>
		<title>Sebastian Kuhlen at 08:03, 23 September 2022</title>
		<link rel="alternate" type="text/html" href="http://phyphox.org/wiki/index.php?title=Puck.js&amp;diff=21127&amp;oldid=prev"/>
		<updated>2022-09-23T08:03:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 08:03, 23 September 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot; &gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[phyphox://phyphox.org/wiki/images/8/8c/Puck.zip Puck.zip]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[phyphox://phyphox.org/wiki/images/8/8c/Puck.zip Puck.zip]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you want to create your own experiment configuration with custom code, we recommend that you start with one of the examples from the Puck.zip above. You will find, that the JavaScript code can be embedded in a rather clear form by creating several config blocks. However, there are a few things that you should keep in mind:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;== Custom code and experiment configuration ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you want to create your own experiment configuration with custom code, we recommend that you start with one of the examples from the Puck.zip above&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. Just download the zip file and open one of the contained phyphox files in a text editor&lt;/ins&gt;. You will find, that the JavaScript code can be embedded in a rather clear form by creating several config blocks. However, there are a few things that you should keep in mind:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* At the time of this writing, the puck.js supports a MTU of 53 byte, which means that any entry between config-tags and any data that you try to send back to phyphox in one go may not exceed 53 characters.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* At the time of this writing, the puck.js supports a MTU of 53 byte, which means that any entry between config-tags and any data that you try to send back to phyphox in one go may not exceed 53 characters.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Phyphox strips leading and trailing whitespaces within the config tags. This allows you to indent your JavaScript without loosing characters in terms of the MTU, but this also means that a final line break to trigger execution either needs an additional character after that (for example a comment with just &amp;lt;code&amp;gt;//&amp;lt;/code&amp;gt;) or you need to encode the line break as a carriage return character as we do in the examples (hexadecimal 0x0d).&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Phyphox strips leading and trailing whitespaces within the config tags. This allows you to indent your JavaScript without loosing characters in terms of the MTU, but this also means that a final line break to trigger execution either needs an additional character after that (for example a comment with just &amp;lt;code&amp;gt;//&amp;lt;/code&amp;gt;) or you need to encode the line break as a carriage return character as we do in the examples (hexadecimal 0x0d).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sebastian Kuhlen</name></author>
		
	</entry>
	<entry>
		<id>http://phyphox.org/wiki/index.php?title=Puck.js&amp;diff=21126&amp;oldid=prev</id>
		<title>Sebastian Kuhlen: Created page with &quot;The [https://www.puck-js.com/ Puck.js] is a small button style sensor box. It is open source and JavaScript code can be uploaded to the Puck.js allowing for almost arbitrary u...&quot;</title>
		<link rel="alternate" type="text/html" href="http://phyphox.org/wiki/index.php?title=Puck.js&amp;diff=21126&amp;oldid=prev"/>
		<updated>2022-09-23T08:01:04Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The [https://www.puck-js.com/ Puck.js] is a small button style sensor box. It is open source and JavaScript code can be uploaded to the Puck.js allowing for almost arbitrary u...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The [https://www.puck-js.com/ Puck.js] is a small button style sensor box. It is open source and JavaScript code can be uploaded to the Puck.js allowing for almost arbitrary usage of its various sensors, LEDs and Bluetooth communication.&lt;br /&gt;
&lt;br /&gt;
From version 1.1.12 phyphox will directly recognize available Puck.js in the Bluetooth scan dialog and offer reading their accelerometer, gyroscope, magnetometer, light sensor, thermometer or voltage from a specific GPIO pin. Until the release of version 1.1.12 or later if you are looking for a reference implementation to modify, you can get this set of experiment configurations here:&lt;br /&gt;
&lt;br /&gt;
[phyphox://phyphox.org/wiki/images/8/8c/Puck.zip Puck.zip]&lt;br /&gt;
&lt;br /&gt;
If you want to create your own experiment configuration with custom code, we recommend that you start with one of the examples from the Puck.zip above. You will find, that the JavaScript code can be embedded in a rather clear form by creating several config blocks. However, there are a few things that you should keep in mind:&lt;br /&gt;
* At the time of this writing, the puck.js supports a MTU of 53 byte, which means that any entry between config-tags and any data that you try to send back to phyphox in one go may not exceed 53 characters.&lt;br /&gt;
* Phyphox strips leading and trailing whitespaces within the config tags. This allows you to indent your JavaScript without loosing characters in terms of the MTU, but this also means that a final line break to trigger execution either needs an additional character after that (for example a comment with just &amp;lt;code&amp;gt;//&amp;lt;/code&amp;gt;) or you need to encode the line break as a carriage return character as we do in the examples (hexadecimal 0x0d).&lt;br /&gt;
* In order to use the Bluetooth UART characteristics for communication, you should disable echo (&amp;lt;code&amp;gt;echo(false)&amp;lt;/code&amp;gt; in the examples) and you should directly write to the characteristic to avoid splitting your string into multiple messages or some feedback from the interpreter. To do so, you can reuse the &amp;lt;code&amp;gt;directOut&amp;lt;/code&amp;gt; function from the examples.&lt;br /&gt;
&lt;br /&gt;
Let us know if you need any support or if you created something cool with this.&lt;/div&gt;</summary>
		<author><name>Sebastian Kuhlen</name></author>
		
	</entry>
</feed>