Forum >Replies by Xia Rex
userhead Xia Rex
Replies (20)
  • You Reply: Sorry I have not done this particular experiment myself, but I would imagine your main effort would land on the Edison's bluetooth documentations.
  • You Reply: Hi,

    For one thing, Vortex core is an Uno chip, it can handle firmata but it may not behave well because all those peripheral devices needs proper driver that is not included in standard firmata. That's why we use our own firmware in the first place.

    The firmata version of Scratch is designed for the general Uno chip, especially our Bluno series.

    But I can still answer your questions:

    1. I have successfully uploaded firmware using XLoader, it may be slow or fail on occasions, but you can always try again to upload new firmware. Vortex firmware hex file is application file, bootloader code is not included and will not be wiped during the process.
    Bootloader code address is located at the end of the address space, not the beginning.

    2. The mobile app will prompt for firmware upgrade when the code in Vortex is not the latest official firmware. Does not matter if you put firmata, blink or older version of firmware on it, it will prompt for upgrade. Detection process is protocol based.

    3. WhenDo no longer can restore firmware. We migrated this function to the Vortex mobile app. Before the migration, it can restore the firmware regardless of the present code inside Vortex. This is the same for the mobile apps, firmware upgrade or rewrite is clean, complete, idempotent, independent and up-to-date.

    Mares Jaroslav wrote:After getting good experience with Scratch for Vortex I’d like to try the Scratch for Arduino functionality now. The DF4Scratch Manual contains all necessary instructions but uploading the StandardFirmata to Vortex board seems to me rather risky. Before doing it I want to be sure that I will be able to restore the original firmware, which is necessary for running both Scratch for Vortex and the Android VortexBot.apk.

    Xia Rex informed me that the firmware hex file is available on DFResources and can be simply uploaded using a freeware utility called Xloader. I tried it very carefully, by “updating” the original firmware, but did not succeed. With Vortex connected by usb cable (connected to COM1, rate 9600, device specified as UNO) the Xloader started, displayed “Uploading” for more than an hour and nothing visible happened all the time except that the Vortex woke up about every five minutes and produced a short music and dance. Discussion on Xloader website proves that many other people have experienced similarly hanging and unresponsive Xloader, too. Fortunately, when I stopped it, switched Vortex off /on and started the VortexBot, the Vortex connected, asked for firmware update and after it completion worked as before.

    So I would like to ask here three questions:

    1) The Vortex.2.hex file contains 1745 lines with code that should rewrite flash memory from address 0000, i.e. including the bootloader. At the same time the author of Xloader specifies it as “a small program that can be used to upload your own *.hex files to arduino boards using the bootloader”. If that mean that in my case the bootloader rewrites itself, may be within a locked memory section, couldn’t this make the trouble?

    2) The firmware update option in VortexBot.apk can upload firmware as well. Could it perhaps recognize Firmata or other Arduino sketch as “wrong firmware” version and ask for its update?

    3) I do not own any iOS device but just for completeness: WhenDo application also can restore firmware when the user wishes to return to VortexBot. Would this function work for any sketch uploaded to Vortex or just for sketches produced by WhenDo itself?
  • You Reply: Hi,

    I am assuming you have both applications on your iPad. Please try to completely terminate the Vortex game app when you want to switch to WhenDo.

    Please notice that you need to terminate either application completely ( double tap home button and swipe the application out of the screen ) to make it stop trying to make bluetooth connections. Any bluetooth-based devices can only connect to one application at a time, so you need to manually terminate other application.

    We have registered this problem and are working on a solution to work around this issue.

    Thank you very much.

    Vigliotti Louis wrote:Hi,

    What's with the Vortex robot? More specifically, why doesn't this thing work with the latest version of WhenDo? Now the issue is the lack of connection through Bluetooth. If you use the Vortex app everything seems to work fine, however the app has a crippled version of WhenDo.

    At the moment I have three pretty useless "robots".
  • You Reply: Hi,

    The main WhenDo logic works as a group of trigger-based actions. Whenever the condition is met, the action will be triggered after it completes the chain of actions.

    In this case, when Vortex finishes moving forward( or turning around if only one wheel has speed parameter) then it stops for 0 seconds, and checks for the condition. The condition is satisfied, then it keeps triggering the moving forward.

    The quick way is make the stopping action longer, say 9999 seconds. It will wait long enough before it triggers.

    Another option is using the Boolean switch. Putting the Boolean value into the condition for the first time, and if you want Vortex to stop, set the Boolean value to false will force the condition to be false, hence stopping the actions to be triggered.

    renoepelboin wrote:Hello everibody
    Can someone explain me how to stop a move.
    Sensors on do active a move forward (speed 50, 2 s lenght) then move forward (speed 0, lenght 0) don't stop the Vortex...
    it's just turning round and round...
    Can you tell me how to stop a move, please?
  • You Reply: Hi,

    You can use Serial.print() to send messages to your phone. In Bluno the serial and bluetooth are wired together. However you need to work on the Android side to receive raw data from the data characteristic.

    thuertas wrote:hi there!!
    thanks for the schematic ... however Im still confused ... what should I write in the code just to send, lets say a number to the phone?
    This is the first time I ever try an arduino ... and well Arduino UNO needs a modem for the bluetooth so then you know the pins where it is connected ... how does it work with the Bluno?

    regards.
  • You Reply: whendo的模块是只要满足条件就会触发的,如果没有条件就会默认一直处于触发阶段,并不能只触发一次。如果您希望电机只往前行动一次的话,可以添加bool逻辑模块控制它的状态。
    wyzlx56 wrote:我在ipad上更新了最新版的whendo程序,在编程时,使用vortex电机1,前进(速度设为0,时间设为2),并没有像预期的一样停止电机,而是左侧电机停止,右侧电机还在转动。我试着尝试恢复出厂设置,电机使用都正常,我想应该是whendo有问题。希望解答。
  • You Reply: Hi,

    Vortex attaches its Bluetooth to its serial port so you need a BLE link https://www.dfrobot.com/index.php?route=product/product&product_id=1220&search=ble+link&description=true#.VrFKBcd7wW8 from DFRobot to work with Vortex wirelessly. But alternatively you can also just plug in an USB cable. Pairing is not necessary if you are using the BLE link, just put Vortex close to it and connection is automatic.

    If you prefer to do this via your own bluetooth, then you need to find some software to simulate your bluetooth to a serial device. I have not found anything useful in this case.

    formless wrote:Hello,

    I try to install all component step by step like in this pdf "s4a for vortex tutorial.pdf" but always i have problem with Scratch becouse, the green lamp don't give the light ? Any ideas? (Win 10, bluetooth 4.0). Also the bluetooth 4.0 in my PC always want to PIN to connect (par) with VORTEX.

    BTW: In pdf step 4 you must clik and opened by administrator on right button mouse, countrary you see the error.
  • You Reply: Hi,

    Vortex attaches its Bluetooth to its serial port so you need a BLE link https://www.dfrobot.com/index.php?route=product/product&product_id=1220&search=ble+link&description=true#.VrFKBcd7wW8 from DFRobot to work with Vortex wirelessly. But alternatively you can also just plug in an USB cable. Pairing is not necessary if you are using the BLE link, just put Vortex close to it and connection is automatic.

    If you prefer to do this via your own bluetooth, then you need to find some software to simulate your bluetooth to a serial device. I have not found anything useful in this case.

    formless wrote:Hello,

    I try to install all component step by step like in this pdf "s4a for vortex tutorial.pdf" but always i have problem with Scratch becouse, the green lamp don't give the light ? Any ideas? (Win 10, bluetooth 4.0). Also the bluetooth 4.0 in my PC always want to PIN to connect (par) with VORTEX.

    BTW: In pdf step 4 you must clik and opened by administrator on right button mouse, countrary you see the error.
  • You Reply: Hi,

    The greyscale sensor works as a trigger. Whenever the sensor sees a change, it passes the data to the backend service. It does not matter if it is white to black or black to white, the message is identical. Originally I only set the status to true once a message arrives.
    So I have changed the status, and added a trigger count for better information. Updates are ready on github.
  • You Reply: Hi,

    The greyscale sensor works as a trigger. Whenever the sensor sees a change, it passes the data to the backend service. It does not matter if it is white to black or black to white, the message is identical. Originally I only set the status to true once a message arrives.
    So I have changed the status, and added a trigger count for better information. Updates are ready on github.
  • You Reply: Hi,

    Yes, like you have insightfully deduced that we relay sensor data that way.

    For proximity, the issue only happens with the early firmware. I suppose you are using the first version of firmware. It has some compatibility issues with Scratch and we have already fixed in the latest version of firmware. To update, please go to https://github.com/DFRobot/DFResources for latest android version ( most compatible with android 5.x version phones with Bluetooth 4.0 hardware). Or if you have iphone/ipad, you can search for Vortex app. Upgrade detection is automatic.

    I need a bit more time to test the greyscale sensor data. I'll get back to you when I have something.

    Mares Jaroslav wrote:Hi Rex,

    Many thanks for your reply. Your updated DF4Scratch.zip really solved my points 2-3-4 and the ‘red/flashing green/100% green’ signalling levels of Vortex connection mentioned in point 1 are informative enough and don’t need to be changed.

    I also understand your explanation of sensor programming troubles caused by commands in Scratch, which simply ask for a Vortex sensor value but have to do it by sending a HTTP request via extension helper and then waiting for answer which needs to come back on the same road. Yes, it’s no comfort but kids can learn anyway what a sensor is, what is it good for and how to program a robot responding to sensor values.

    Unfortunately, I have to repeat my question you have avoided. Why do the Scratch sensor blocks work just once after Vortex’s start? I suppose that Vortex’s firmware uses a dictionary of sensor variables and executing a reporter block then simply returns the most recently reported value for the appropriate sensor variable. So when I wave in front of Vortex, the proximity sensor (an Arduino pin) signals true (1), and with my hand off this value should change to false (0). But this does not happen:
    proximity.JPG

    Similar test with the same result can be done with the greyscale blocks. Of course, as you clarified, their behaviour is more complicated, so I would be happy to solve the proximity first. I am looking forward to your response again.
  • You Reply: If you want to connect to PC, a regular usb cable would be fine. But for Edison, I think your best option would be to connect and communicate via serial. That way both bluno and edison works only with serial communication and abstracts away the bluetooth bit.
    Search for SPP in this document:
    Code: Select all
    http://www.intel.com/content/www/us/en/support/boards-and-kits/000005743.html


    mail wrote:Hi,
    On the wiki it says that you need either another bluno or your BLE USB dongle to connect to the bluno from a PC. Is there really no way to talk to the bluno using the PC's built in Bluetooth module? Using Light Blue on OS X I can see the bluno, but it doesn't provide a console. What I really want to do is connect an Intel edison (which has built in bluetooth and runs linux) to the bluno. For space reasons I really don't want an extra bluetooth module.
  • You Reply: Hi,

    Latest Release on github fixed the bottom light issue, using an 'init' command after connection. You don't need to go through the short dance ritual again.

    Regards,
    Rex
  • You Reply: Hi,

    Latest Release on github fixed the bottom light issue, using an 'init' command after connection. You don't need to go through the short dance ritual again.

    Regards,
    Rex
  • You Reply: Hi,

    Thanks again for such detailed feedback. I'll get to each of your points.
    1. The green dot indicates if a vortex is being connected with steady communication. Our communication service program uses time out mechanism so it responds with a bit of latency. Only a Vortex with default firmware installed will interact with the service and keep the green light on. This is expected. If the flashing seems to be confusing we might need to find a way to make it red.

    2. That has something to do with the connection method. If the Vortex is connected via bluetooth, then it will act as such. But if connected with cable, the signals goes through serial port directly and bypasses bluetooth. So it has no idea. Vortex, or Arduino compatible devices, does not regard serial port connection as stateful as bluetooth connection, it just sends and reads signals from it, regardless if the serial port is connected or not. We will put this point into consideration for our next iteration of Vortex firmware design.

    3. Same as above. Maybe we can find a way to consolidate its behaviour. Still, Vortex is mainly designed for Bluetooth connection so please do not be discouraged if we assign higher priority to functions related to Bluetooth.

    4. I'll revisit the color scheme and make changes to the menus accordingly. Thanks for the heads-up.

    5. Greyscale and proximity does need some explaining. We must remind you that programming with sensors are harder with Scratch because they have significant latency with bluetooth/network traffic overhead. Network traffic overhead is more and inevitable because that is how Scratch talks to its extensions.

    Another big thumbs up for spotting the bug in the extension description file. I did not notice that because I did not use 'duplicate' function during testing. Good to know.

    One thing I must clarify is how the greyscale sensor actually works with Scratch. Fact is, they work not so great in the form of a bool status. Greyscale sensors sense the change of the surface color beneath the sensor. It triggers whenever there is a change, whether it is white to black or black to white. In fact you don't need the sensitivity block for this to work at all. The threshold is hard coded. That redundant block will be removed.

    We have to admit that we did not put too much effort on the greyscale sensor functions because they are too slow to respond, and the latency is sporadic due to the large network traffic overhead. You cannot easily program sleek sensor based programs on Scratch, but you can program simple examples like hand-waving signals, or 'reverse wheels when stepped on a black line'. This is entire reason that we promote our WhenDo application on iPad. It enables native programming without any overhead.

    We will dig into 'sensing' blocks in Scratch and see if we can migrate some of the functions to there.

    I have released updates regarding greyscale threshold block and eye color fix.

    Thanks again.


    Mares Jaroslav wrote:I have searched for the cause of the damaged program in my post above and found another deficiency of S4V solution. Scratch 2 Offline Editor can input so called extension description file, where all additional command and reporter blocks are described (its format is available on Scratch wiki). These blocks then appear in the More Blocks palette. Scratch cannot execute them itself but calls another application that must be installed as part of extension.

    In our environment the extension description file is ‘vortex.s2e’ (in ’contents’ folder). Its lines belonging to two greyscale blocks are visible in the picture below. The trouble is that both, i.e. the command block and the reporter block use the same (yellow) name as a reference to appropriate operation or sensor variable. It seems that Scratch identifies blocks in saved programs by this name and always uses the first line only while opening a file. Therefore any Scratch program containing the block placed in vortex.s2e in the second place will be always damaged when saved.

    grayscale.jpg
  • You Reply: Hi,

    Thanks again for such detailed feedback. I'll get to each of your points.
    1. The green dot indicates if a vortex is being connected with steady communication. Our communication service program uses time out mechanism so it responds with a bit of latency. Only a Vortex with default firmware installed will interact with the service and keep the green light on. This is expected. If the flashing seems to be confusing we might need to find a way to make it red.

    2. That has something to do with the connection method. If the Vortex is connected via bluetooth, then it will act as such. But if connected with cable, the signals goes through serial port directly and bypasses bluetooth. So it has no idea. Vortex, or Arduino compatible devices, does not regard serial port connection as stateful as bluetooth connection, it just sends and reads signals from it, regardless if the serial port is connected or not. We will put this point into consideration for our next iteration of Vortex firmware design.

    3. Same as above. Maybe we can find a way to consolidate its behaviour. Still, Vortex is mainly designed for Bluetooth connection so please do not be discouraged if we assign higher priority to functions related to Bluetooth.

    4. I'll revisit the color scheme and make changes to the menus accordingly. Thanks for the heads-up.

    5. Greyscale and proximity does need some explaining. We must remind you that programming with sensors are harder with Scratch because they have significant latency with bluetooth/network traffic overhead. Network traffic overhead is more and inevitable because that is how Scratch talks to its extensions.

    Another big thumbs up for spotting the bug in the extension description file. I did not notice that because I did not use 'duplicate' function during testing. Good to know.

    One thing I must clarify is how the greyscale sensor actually works with Scratch. Fact is, they work not so great in the form of a bool status. Greyscale sensors sense the change of the surface color beneath the sensor. It triggers whenever there is a change, whether it is white to black or black to white. In fact you don't need the sensitivity block for this to work at all. The threshold is hard coded. That redundant block will be removed.

    We have to admit that we did not put too much effort on the greyscale sensor functions because they are too slow to respond, and the latency is sporadic due to the large network traffic overhead. You cannot easily program sleek sensor based programs on Scratch, but you can program simple examples like hand-waving signals, or 'reverse wheels when stepped on a black line'. This is entire reason that we promote our WhenDo application on iPad. It enables native programming without any overhead.

    We will dig into 'sensing' blocks in Scratch and see if we can migrate some of the functions to there.

    I have released updates regarding greyscale threshold block and eye color fix.

    Thanks again.


    Mares Jaroslav wrote:I have searched for the cause of the damaged program in my post above and found another deficiency of S4V solution. Scratch 2 Offline Editor can input so called extension description file, where all additional command and reporter blocks are described (its format is available on Scratch wiki). These blocks then appear in the More Blocks palette. Scratch cannot execute them itself but calls another application that must be installed as part of extension.

    In our environment the extension description file is ‘vortex.s2e’ (in ’contents’ folder). Its lines belonging to two greyscale blocks are visible in the picture below. The trouble is that both, i.e. the command block and the reporter block use the same (yellow) name as a reference to appropriate operation or sensor variable. It seems that Scratch identifies blocks in saved programs by this name and always uses the first line only while opening a file. Therefore any Scratch program containing the block placed in vortex.s2e in the second place will be always damaged when saved.

    grayscale.jpg
  • You Reply: Hi,

    The PH meter is designed to measure the PH value of liquid solution. If you use it in soil, it may not work with the expected accuracy, it may not work at all.

    However you can take some sample of the soil and create water based solution and measure that instead. Automated approach, I imagine, would take a lot more effort.

    gonzalesenric wrote:I recently bought an analog pH meter and I was wondering if it can be used for soil analysis. I'm planning to use it to measure the pH values of soil.

    Thanks
  • You Reply: Hi,

    There is a tutorial for that. https://www.cooking-hacks.com/projects/arduino-realtime-gps-gprs-vehicle-tracking

    You need to setup your own server on a public domain though, if you really need to get it working. Amazon offers a trail period for free.
  • You Reply: Proximity Sensors are infrared emitters and sensors, located in the black part in the front of vortex.

    They respond to white objects better. Try use paper.

    seize.the.night wrote:Working through the when do Tute and it doesn't react to anything being sat in front of it??? Any ideas??

    Basically using

    Proximity==True, move forward speed 80 delay 2, followed by move forward speed 0 delay 0
  • You Reply: Hi,

    The board equivalent is bluno (most closely related to Uno with BLE). The various components are bit tricky to manipulate, and we recommend using the IOS WhenDo app to code it visually first.

    owize1 wrote:Any documentation available regarding the Arduino IDE? Board equivalent? Pin outs? Example code? Anything would be helpful.

    Thanks