<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Text programming (new threads)</title>
		<link>http://aseba.wikidot.com/forum/c-1083710/text-programming</link>
		<description>Threads in the forum category &quot;Text programming&quot; - If you have a question about text programming</description>
				<copyright></copyright>
		<lastBuildDate>Sat, 18 Apr 2026 23:29:05 +0000</lastBuildDate>
		
					<item>
				<guid>http://aseba.wikidot.com/forum/t-13354280</guid>
				<title>Wny Thymio with different firmware version cannot read the same SD card</title>
				<link>http://aseba.wikidot.com/forum/t-13354280/wny-thymio-with-different-firmware-version-cannot-read-the-s</link>
				<description></description>
				<pubDate>Fri, 22 May 2020 03:08:17 +0000</pubDate>
				<wikidot:authorName>Alice Yang</wikidot:authorName>				<wikidot:authorUserId>3348349</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Thanks! We are the user in Hong Kong and we don't understand why the program from the SD can only be read with a Thymio firmware version 10, and same SD card cannot be read by Thymio firmware version 11, 12 or 13.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-12932441</guid>
				<title>Timer issue</title>
				<link>http://aseba.wikidot.com/forum/t-12932441/timer-issue</link>
				<description>Unexpected behaviour from a program with a timer</description>
				<pubDate>Tue, 14 Jan 2020 23:19:43 +0000</pubDate>
				<wikidot:authorName>EmmanuelR</wikidot:authorName>				<wikidot:authorUserId>6022232</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi all!</p> <p>I've got this program (code below) that isn't working as expected. There must me something wrong with the timer. Could you help me find out what?</p> <p><em>Scenario:</em><br /> The forward button is pressed, then the right button is pressed.</p> <p><em>Actual result:</em><br /> The right wheel start turning and keep turning indefinitely.</p> <p><em>Expected result:</em><br /> The right wheel starts turning and then stops after one second.</p> <p>Program:</p> <div class="code"> <pre><code>onevent button.center when button.center == 1 do motor.left.target = 0 motor.right.target = 0 call leds.top(32,0,0) end onevent button.forward when button.forward == 1 do call leds.top(6,26,0) while not (button.center == 1) do if button.right == 1 then motor.right.target = -100 timer.period[0] = 1000 call leds.top(32,13,0) end if button.left == 1 then motor.right.target = 100 timer.period[0] = 1000 call leds.top(32,26,0) end end end onevent timer0 motor.left.target = 0 motor.right.target = 0 call leds.top(6,6,32)</code></pre></div> <p>Best regards,<br /> Emmanuel</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-12886665</guid>
				<title>Thymio Obstacle avoidance</title>
				<link>http://aseba.wikidot.com/forum/t-12886665/thymio-obstacle-avoidance</link>
				<description>Improving the braitenberg algorithm to avoid getting stuck.</description>
				<pubDate>Mon, 30 Dec 2019 22:55:59 +0000</pubDate>
				<wikidot:authorName>Braitenbergo</wikidot:authorName>				<wikidot:authorUserId>5989293</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi,<br /> I want to know how can I improve the following code so thymio does not get stuck correcting the position and what to do to run it smoothly when it is not detecting any objects in front of him and not bumping from one side to the other. Is there a way of correcting the code so it only avoid objects closer to him or is there a better algorithm to avoid obstacles. Thanks!!</p> <p>var mot_l<br /> var mot_r</p> <ol> <li>Variables for Braitenberg avoid routine</li> </ol> <p>var avoid_l[5] = [2, 0, -1, -5, -10]<br /> var avoid_r[5] = [-10, -5, -2, 0, 2]<br /> var avoid_shift = 4<br /> var avoid_offset = MAX_SPEED*2/5</p> <p>callsub init</p> <p>sub init<br /> call leds.temperature(0,0)</p> <p>sub braitenberg_avoid<br /> # Use the vector dot product to calculate motor values<br /> call math.dot(mot_l, avoid_l, prox.horizontal[0:4], avoid_shift)<br /> mot_l += avoid_offset<br /> call math.dot(mot_r, avoid_r, prox.horizontal[0:4], avoid_shift)<br /> mot_r += avoid_offset</p> <p># If motor values are &lt; -MAX_SPEED or &gt; +MAX_SPEED fix them<br /> call math.clamp(mot_l, -MAX_SPEED, mot_l, MAX_SPEED)<br /> call math.clamp(mot_r, -MAX_SPEED, mot_r, MAX_SPEED)</p> <p># Write calculated motor values to Thymio variables to run motors<br /> motor.left.target = mot_l<br /> motor.right.target = mot_r</p> <p>onevent prox<br /> callsub braitenberg_avoid</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-12884182</guid>
				<title>Thymio Robot moving on black tape line in arena?</title>
				<link>http://aseba.wikidot.com/forum/t-12884182/thymio-robot-moving-on-black-tape-line-in-arena</link>
				<description>How exactly do I program the robot to move on the black line? I have no idea where to start</description>
				<pubDate>Mon, 30 Dec 2019 03:07:00 +0000</pubDate>
				<wikidot:authorName>vickycuppiecake</wikidot:authorName>				<wikidot:authorUserId>5987516</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I am trying to make the thymio robot detect the black tape line but it isnt</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-11971003</guid>
				<title>how to read value from the proximity sensors?</title>
				<link>http://aseba.wikidot.com/forum/t-11971003/how-to-read-value-from-the-proximity-sensors</link>
				<description></description>
				<pubDate>Mon, 27 May 2019 13:37:32 +0000</pubDate>
				<wikidot:authorName>dschingiskhan</wikidot:authorName>				<wikidot:authorUserId>5189320</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>im working on a little project where I control the Thymio with Python and a Raspberry Pi.</p> <p>I know how to set the values for the motors:</p> <div class="code"> <pre><code>value = 250 network.SetVariable(&quot;thymio-II&quot;, &quot;motor.left.target&quot;, [value])</code></pre></div> <p>But how can I read the values from the proximity sensors with python?<br /> I tried this but this is not working:</p> <div class="code"> <pre><code>network.GetVariable(&quot;thymio-II&quot;, &quot;prox.horizontal[2]&quot;)</code></pre></div> <p>Does someone has an idea?</p> <p>Thanks.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-11912942</guid>
				<title>Cant do directional receiving with Thymio</title>
				<link>http://aseba.wikidot.com/forum/t-11912942/cant-do-directional-receiving-with-thymio</link>
				<description>Can someone tell me if it is possible to receive the incoming infrared communication directionally? Like is there something more that prox.comm.r?</description>
				<pubDate>Mon, 20 May 2019 09:08:38 +0000</pubDate>
				<wikidot:authorName>joshuacv</wikidot:authorName>				<wikidot:authorUserId>5374597</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Can someone tell me if it is possible to receive the incoming infrared communication directionally? Right now the incoming communication can be found in prox.comm.r when there is a prox.comm event but it is only a single variable. Since there are 7 ir receivers it should be 7 variables. Is there a way to access the actual incoming array? Am I missing something?</p> <p>I also thought of combining incoming ir with proximity sensors but the looks like the range wont allow that. Even if that works, such a solution is a hack and not a proper solution to access the incoming signals directionally.</p> <p>Please let me know if I am missing something! I would appreciate the help. Thanks!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-10476539</guid>
				<title>Thymio move forward 60 cm if a line is detected</title>
				<link>http://aseba.wikidot.com/forum/t-10476539/thymio-move-forward-60-cm-if-a-line-is-detected</link>
				<description></description>
				<pubDate>Sat, 02 Mar 2019 21:47:20 +0000</pubDate>
				<wikidot:authorName>DKPD</wikidot:authorName>				<wikidot:authorUserId>5217450</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hello,</p> <p>How would I do this?</p> <p>If a line is detected at any point, the robot should immediately turn right and follow the line for a given distance of 60cm.</p> <p>Thanks<br /> David</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-10468565</guid>
				<title>barcode lightpainting</title>
				<link>http://aseba.wikidot.com/forum/t-10468565/barcode-lightpainting</link>
				<description>the programm I have found dousn&#039;t work</description>
				<pubDate>Sat, 02 Mar 2019 09:26:41 +0000</pubDate>
				<wikidot:authorName>hanna del beh</wikidot:authorName>				<wikidot:authorUserId>5215748</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Who can help me? On the homepage of Thymio I have found the program, you can see if you scroll down.<br /> But my Problem is, that my thymio only light on its white LED when it drives over the barcode. What can I do, so Thymio light on also blue, red etc. LEDs? Thank you for your help!</p> <p>### VARIABLES DECLARATION ###<br /> var running = 1<br /> var counter = 0<br /> var state<br /> var intensityDiff<br /> var code<br /> #Colors tables<br /> var r[]=[OFF,OFF,OFF,OFF,ON,ON,ON,ON]<br /> var g[]=[OFF,OFF,ON,ON,OFF,OFF,ON,ON]<br /> var b[]=[OFF,ON,OFF,ON,OFF,ON,OFF,ON]</p> <p>call leds.top(r[code], g[code], b[code])<br /> #0=colorless,1=blue,2=green,3=lightblue,4=red,5=darkpink,6=yellow,7=purple</p> <p>### TURNING OFF THE LEDs ###<br /> call leds.prox.v(0,0)<br /> call leds.prox.h(0,0,0,0,0,0,0,0)<br /> call leds.top(0,0,0)<br /> call leds.temperature(0,0)</p> <p>### EVENT BUTTON FORWARD ###<br /> onevent button.forward</p> <ol> <li>starts line tracking and waits for sync bit</li> </ol> <p>if button.forward == 1 then<br /> running = 1<br /> state = S_WAIT_SYNC<br /> end</p> <p>### EVENT BUTTON CENTER ###<br /> onevent button.center<br /> #stops running and motors, turns LEDs off<br /> if button.center == 1 then<br /> running = 0<br /> motor.left.target = 0<br /> motor.right.target = 0<br /> call leds.top(0,0,0)<br /> end</p> <p>### EVENT PROXIMITY SENSORS (EVERY 100&#160;ms =&gt; 10&#160;Hz)###<br /> onevent prox<br /> #if the robot is running, steering and bar code reading are activated<br /> #we use the prox.ground.delta[1] to steer, the &#8230;[0] to check the bar code</p> <p>if running == 1 then</p> <p>### STEERING PART ###<br /> intensityDiff = prox.ground.delta[1]-525<br /> #speed of robot is adjusted to keep around a gray mean value. If<br /> #difference is too important, the robot spins until it finds the line<br /> #again. The steering is controled by the gray gradient of the trail.<br /> if abs(intensityDiff) &lt; 170 then<br /> motor.left.target = 115+intensityDiff/8<br /> motor.right.target = 115-intensityDiff/8<br /> else<br /> motor.left.target = intensityDiff/4<br /> motor.right.target = -intensityDiff/4<br /> #edit to stop colours if line is lost<br /> state = S_WAIT_SYNC<br /> end</p> <p>### BAR CODE CHECKING PART ###<br /> #if Thymio is waiting for sync and crosses a black line, it starts bar<br /> #code reading and turns LEDs off.<br /> if state == S_WAIT_SYNC and prox.ground.delta[0] &lt; BW_LIMIT then<br /> state = S_READING<br /> call leds.top(0,0,0)<br /> counter = 0<br /> emit data [prox.ground.delta[0],1000]<br /> end<br /> emit data [prox.ground.delta[0],0]<br /> #if state is reading, the robot reads the bar code<br /> if state == S_READING then</p> <p>#we wait to count to 2 times the timer = 100&#160;ms (counter is<br /> #increment at the end of the code) so we are in the middle of the<br /> #black sync box<br /> if counter == 2 then<br /> code=0<br /> #we wait the first two counter + one INTERVAL (4 * 50ms) to measure<br /> #the first block of bar code. This can be tuned to match with the<br /> #speed of the robot<br /> elseif counter == (2+INTERVAL) then<br /> emit data [prox.ground.delta[0],1000]<br /> #if bit is white set code to 1 (c0=001b)<br /> if prox.ground.delta[0]&gt;BW_LIMIT<br /> then code=1<br /> else code=0<br /> end<br /> #test again after another INTERVAL<br /> elseif counter == (2+2*INTERVAL) then<br /> emit data [prox.ground.delta[0],1000]<br /> #if bit is white add 2^1 to code (c1=010b)<br /> if prox.ground.delta[0]&gt;BW_LIMIT<br /> then code +=2<br /> end<br /> elseif counter == (2+3*INTERVAL) then<br /> emit data [prox.ground.delta[0],1000]<br /> #if bit is white add 2^2 to code (c2=100b)<br /> if prox.ground.delta[0]&gt;BW_LIMIT then code +=4<br /> end</p> <p>#LEDs are turned on according to binary code (c2 c1 c0)<br /> call leds.top(r[code],g[code],b[code])<br /> #again another INTERVAL and we go back to S_WAIT_SYNC to wait for<br /> #the next bar code<br /> elseif counter == (2+4*INTERVAL+3) then<br /> state = S_WAIT_SYNC<br /> end<br /> counter += 1<br /> else<br /> call leds.circle(0,0,0,0,0,0,0,0)<br /> end<br /> end</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-7376124</guid>
				<title>emit function to a file</title>
				<link>http://aseba.wikidot.com/forum/t-7376124/emit-function-to-a-file</link>
				<description>send a variable from aseba in code to a file.txt</description>
				<pubDate>Thu, 06 Sep 2018 08:47:05 +0000</pubDate>
				<wikidot:authorName>sherokhi</wikidot:authorName>				<wikidot:authorUserId>4584306</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I saw on the forum that the function emit can send information to the computer in the case where the thymio is connected, so I would like to know if it is possible to use this function emit to send the data in a specific file . If so, would you have a syntax or otherwise an explanation for emit with basic syntax. Thanks in advance: D</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-6384964</guid>
				<title>Communicating with Thymio in another language</title>
				<link>http://aseba.wikidot.com/forum/t-6384964/communicating-with-thymio-in-another-language</link>
				<description>How can I communicate with Thymio in another language like C or C++?</description>
				<pubDate>Fri, 13 Jul 2018 15:41:31 +0000</pubDate>
				<wikidot:authorName>sina1374</wikidot:authorName>				<wikidot:authorUserId>4238654</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hello,</p> <p>I need to run some robot controller code in C++ on Thymio. How can I do this? I have seen examples on this website using a tool called Asebamedulla to execute python and communicate with Thymio's VM, setting and reading variables. I basically want to do the same in C or C++.</p> <p>I've seen Aseba's Github repository and there are <a href="https://github.com/aseba-community/aseba/tree/master/examples/clients">examples</a> using Asebamedulla and dbus to communicate with Thymio. I managed to execute the code from <a href="https://www.thymio.org/en:thymioraspyexample">Thymio RaspberryPy example</a> on the robot, but when I execute <a href="https://github.com/aseba-community/aseba/tree/master/examples/clients">C++ examples</a> I receive compilation errors. I don't know if it is possible to use them or not.</p> <p>Thank you</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-5313503</guid>
				<title>programming thymio II directly with c compiler</title>
				<link>http://aseba.wikidot.com/forum/t-5313503/programming-thymio-ii-directly-with-c-compiler</link>
				<description></description>
				<pubDate>Tue, 20 Feb 2018 10:39:56 +0000</pubDate>
				<wikidot:authorName>Hassen Hmila</wikidot:authorName>				<wikidot:authorUserId>3690247</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>hi i need to use serial port ( tx , rx) to transfer informations from arduino to thymio II II is it any possibility to programming serial port in aseba? , and is it any possibility to program thymio directly with c compiler ? thank you</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-4312251</guid>
				<title>Can I export sb2 file to aesl</title>
				<link>http://aseba.wikidot.com/forum/t-4312251/can-i-export-sb2-file-to-aesl</link>
				<description>I wrote some testing programs on scratch, how can I convert it to aesl format and upload it to my thymio?</description>
				<pubDate>Sun, 19 Nov 2017 06:49:34 +0000</pubDate>
				<wikidot:authorName>Joey Hong</wikidot:authorName>				<wikidot:authorUserId>3457275</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I wrote some testing programs on scratch, how can I convert it to aesl format and upload it to my thymio? I think my thymio is the first version, no wireless feature.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-2395660</guid>
				<title>Emit something</title>
				<link>http://aseba.wikidot.com/forum/t-2395660/emit-something</link>
				<description>I can&#039;t do this!</description>
				<pubDate>Mon, 26 Jun 2017 16:10:53 +0000</pubDate>
				<wikidot:authorName>usernamesarita</wikidot:authorName>				<wikidot:authorUserId>3208382</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hello everyone!</p> <p>I'm sarita and I'm trying to use the emit function, in order to have the robots communicating with each other. However, i'm with some problems.. :'(<br /> The robots are not receiving the information emited. I tried to use the example that was provided in the website, but it still doesn't work.</p> <p>This is the example:</p> <p>Code for Robot 1</p> <ol> <li>variables</li> </ol> <p>var counter = 0</p> <p>onevent ir_sensors</p> <p>if counter == 10 then<br /> emit move [1,0]<br /> end</p> <p>if counter == 100 then<br /> emit move [0,1]<br /> end</p> <p>counter += 1</p> <p>Code for Robot2:</p> <ol> <li>events</li> </ol> <p>onevent move<br /> if args[0] == 1 then<br /> leftSpeed = 400<br /> rightSpeed = 400<br /> else<br /> leftSpeed = 0<br /> rightSpeed = 0<br /> end</p> <p>onevent stop<br /> leftSpeed = 0<br /> rightSpeed = 0</p> <p>Code for Robot3:</p> <ol> <li>events</li> </ol> <p>onevent move<br /> if args[1] == 1 then<br /> leftSpeed = 400<br /> rightSpeed = 400<br /> else<br /> leftSpeed = 0<br /> rightSpeed = 0<br /> end</p> <p>onevent stop<br /> leftSpeed = 0<br /> rightSpeed = 0</p> <p>Help me please!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-2177326</guid>
				<title>Signal to computer possible?</title>
				<link>http://aseba.wikidot.com/forum/t-2177326/signal-to-computer-possible</link>
				<description>I was wondering if they was a way to send a signal to the computer when the thymio meets a certain kind of event, so the computer can start a chain of event according to the info such as changing an information on a website coded in html css and js (like saying the thymio has done it&#039;s task or is ready) or to make the computer turn on/off a led lightstrip.</description>
				<pubDate>Thu, 23 Mar 2017 13:50:44 +0000</pubDate>
				<wikidot:authorName>neizo</wikidot:authorName>				<wikidot:authorUserId>3023204</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi</p> <p>Today we are launching our micro project in high school (in switzerland) and we have to code a website and the thymio to make it do something. Our goal was to create a mini game and I was wondering if there was a way to send a signal to the computer when the thymio meets a certain kind of event. This way, the computer can start a chain of event according to the info such as changing an information on a website coded in html css and js (like saying the thymio has done it's task or is ready) or to make the computer turn on/off a led lightstrip.</p> <p>This would allow us to make an interactive game. We want the thymio to send an information to the computer to tell when he is done. Then on the website, a special message would appear and the computer would make the led lighstrip flash. There would be another interaction, it's a cooldown &quot;spell&quot;. When the thymio has used one of the ability, the case showing it (on the playground) would turn off, and then turn on back again when its cooldown is over.</p> <p>My idea was to make a signal with aseba that is then sent to the computer, and then, the computer uses this info to change the info on the website with JS and change the led. But I don't really know if this is possible, if you can send a signal that is then used in a different language, and if you can send a signal at all.</p> <p>And if internally it's impossible, my idea was to plug a certain kind of ship that then send a wifi signal to the computer. Is this possible?</p> <p>Thanks a lot for your answers,</p> <p>Neizo</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-2050898</guid>
				<title>Change Aseba in English</title>
				<link>http://aseba.wikidot.com/forum/t-2050898/change-aseba-in-english</link>
				<description></description>
				<pubDate>Tue, 03 Jan 2017 18:18:27 +0000</pubDate>
				<wikidot:authorName>ddamdam1</wikidot:authorName>				<wikidot:authorUserId>2939683</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>I'm french, I would like to change Aseba in English to improve myself in English.</p> <p>I didn't find a way to make that. Can you help me?</p> <p>Thank you.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-2046411</guid>
				<title>Asynchronousli programming</title>
				<link>http://aseba.wikidot.com/forum/t-2046411/asynchronousli-programming</link>
				<description></description>
				<pubDate>Thu, 29 Dec 2016 18:29:58 +0000</pubDate>
				<wikidot:authorName>Kinou21</wikidot:authorName>				<wikidot:authorUserId>2908740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hello everyone !</p> <p>I am currently working on a project ; here is a short description:</p> <p>Thymio starts rolling after a set period of time with the remote control and then avoids the objects they meet on his way.</p> <p>I would like that the code allowing the avoidance of objects only starts once the time defined previously has elapsed.</p> <p>Do you have any tips?</p> <p>Thank you !</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-2046266</guid>
				<title>communication between two thymio&#039;s</title>
				<link>http://aseba.wikidot.com/forum/t-2046266/communication-between-two-thymio-s</link>
				<description>I don&#039;t succeed to write a correct program...</description>
				<pubDate>Thu, 29 Dec 2016 15:43:36 +0000</pubDate>
				<wikidot:authorName>droupi52</wikidot:authorName>				<wikidot:authorUserId>2852574</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi everyone,</p> <p>I don't succeed to write a correct program&#8230;for sending a message ( sending a variable) between two thymio's.</p> <p>Has someone already tried to do that? Despite the explanations of the docs; it never succeeded. ( with prox.com.enable etc&#8230;)</p> <p>Thanks for helping!</p> <p>J-M</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-2014926</guid>
				<title>Codes of the preprogrammed behaviours</title>
				<link>http://aseba.wikidot.com/forum/t-2014926/codes-of-the-preprogrammed-behaviours</link>
				<description></description>
				<pubDate>Tue, 29 Nov 2016 16:09:09 +0000</pubDate>
				<wikidot:authorName>Kinou21</wikidot:authorName>				<wikidot:authorUserId>2908740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>Do you know if the text codes of the preprogrammed behaviours are available anywhere ?</p> <p>Thank you !</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-1970358</guid>
				<title>Sequence of actions</title>
				<link>http://aseba.wikidot.com/forum/t-1970358/sequence-of-actions</link>
				<description>Create a sequence of action with timers in text programming</description>
				<pubDate>Wed, 26 Oct 2016 08:30:52 +0000</pubDate>
				<wikidot:authorName>cbarraud</wikidot:authorName>				<wikidot:authorUserId>1665629</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi everyone,</p> <p>I received this mail and I prefer to answer it here:</p> <p>&#8212;</p> <p>I've not used event timers before in robots like these and I am not seeing how to set that up in text-based code.</p> <p>we want to go forward 2 seconds, turn left, go backwards 3 seconds, then stop.</p> <p>how can I code that?</p> <p>&#8212;</p> <p>The easiest is to code a <a href="https://en.wikipedia.org/wiki/Finite-state_machine" target="_blank">state machine</a>. I will go quickly now but don't hesitate to ask for more info :)</p> <p>Here is the final code:</p> <div class="code"> <pre><code>var state = STOP var counter = 0 timer.period[0] = 200 onevent timer0 if state != STOP then counter++ if state == START and counter &gt; TIME_STRAIGHT then state = TURN motor.left.target = -SPEED motor.right.target = SPEED counter = 0 end if state == TURN and counter &gt; TIME_TURN then state = BACK motor.left.target = -SPEED motor.right.target = -SPEED counter = 0 end if state == BACK and counter &gt; TIME_BACK then state = STOP motor.left.target = 0 motor.right.target = 0 counter = 0 end end onevent buttons when button.forward == 1 do state = START motor.left.target = SPEED motor.right.target = SPEED end</code></pre></div> <p>with these constants:</p> <div class="code"> <pre><code>&lt;constant value=&quot;200&quot; name=&quot;SPEED&quot;/&gt; &lt;constant value=&quot;0&quot; name=&quot;STOP&quot;/&gt; &lt;constant value=&quot;1&quot; name=&quot;START&quot;/&gt; &lt;constant value=&quot;2&quot; name=&quot;TURN&quot;/&gt; &lt;constant value=&quot;3&quot; name=&quot;BACK&quot;/&gt; &lt;constant value=&quot;10&quot; name=&quot;TIME_STRAIGHT&quot;/&gt; &lt;constant value=&quot;5&quot; name=&quot;TIME_TURN&quot;/&gt; &lt;constant value=&quot;15&quot; name=&quot;TIME_BACK&quot;/&gt;</code></pre></div> <p>(the constants are added on the top right of Aseba IDE, it's easier to change the global values like speed with that)</p> <p>In two words, here is how it works:</p> <ul> <li>The <tt>state</tt> variable manages the state of the robot. It is equal to STOP, START, TURN&#8230; (it's just a value like 0, 1, 2, the essential is that you don't have two states with the same value).</li> <li>By pressing the forward button, the robot goes to START and start the motors.</li> <li>Then, in the <tt>timer0</tt> event, it counts the time (timer = 200&#160;ms =&gt; every time a timer0 event is triggered, 200&#160;ms passed).</li> <li>Then, one state after the other, the robot changes its wheels speed. The constants <tt>TIME_&#8230;</tt> are used to know how much time to take for every state.</li> </ul> <p>The <tt>TIME_TURN</tt> has to be adjusted regarding the rotation we want to make. The bigger it is, the longer the rotation.</p> <p>I have to go now, but ask if anything is not clear :)</p> <p>Best</p> <p>Christophe</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-1674637</guid>
				<title>Save Code on Thymio?</title>
				<link>http://aseba.wikidot.com/forum/t-1674637/save-code-on-thymio</link>
				<description></description>
				<pubDate>Sun, 10 Apr 2016 15:07:41 +0000</pubDate>
				<wikidot:authorName>ThymioTv</wikidot:authorName>				<wikidot:authorUserId>2284289</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hello, I have a question. How can I protect my code that I wrote on the Thymio memory so that when I Thymio somewhere else but I can play the program without pc and charging cable .</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>