Does Parallax have a road map for BlocklyProp we should be following? I am asking because right now I am just adding random blocks without much of a plan.
How do I add global variables? I know that to add variables inside methods you use setups, but I can't seem to figure out how to add global variables.
For example, all of the cogs that are declared should be declared as global integers allowing other methods to stop the cogs under certain conditions.
ValeT,
For reference: the code is:
int *cog = cog_run(&method, 10);
If you declare a variable it will always be global. Blockly has no support for local variables. Because you need a pointer (I think by seeing the star in the command), you can't use the current variable system.
But you're in luck, I've been extending Blockly so that you will be able to use those in the future.
If you can wait a little while until I can test it thouroughly I'll check it in. Then you'll be able to extend it to use for cog_run.
Michel
ps: please spell my name correctly. There's no 'a' in my first name.
For reference: the code is:
int *cog = cog_run(&method, 10);
If you declare a variable it will always be global. Blockly has no support for local variables. Because you need a pointer (I think by seeing the star in the command), you can't use the current variable system.
But you're in luck, I've been extending Blockly so that you will be able to use those in the future.
If you can wait a little while until I can test it thouroughly I'll check it in. Then you'll be able to extend it to use for cog_run.
Michel
ps: please spell my name correctly. There's no 'a' in my first name.
Thanks for working on that. Let me know if you need any help.
Thanks for working on that. Let me know if you need any help.
Sorry for spelling your name wrong!
ValeT,
I'm already happy that someone's helping to create blocks. It's not really a hard job (I hope to once automate that partly) but there's a lot to do.
It permits me to focus on the larger parts. I'll get back to the way a project is created once I've finished the pointers.
Blocks will then be categorized and will only be available if the category is selected in the project. This way the list of blocks will be limited to what the user actually wants to use, improving toolbox overview.
I'm already happy that someone's helping to create blocks. It's not really a hard job (I hope to once automate that partly) but there's a lot to do.
It permits me to focus on the larger parts. I'll get back to the way a project is created once I've finished the pointers.
Blocks will then be categorized and will only be available if the category is selected in the project. This way the list of blocks will be limited to what the user actually wants to use, improving toolbox overview.
Michel
That sounds like a great idea! Its going to be needed; the Sensors tab will be huge by the time I am finished with it
I am not sure I understand what the Blockly.ORDER_ATOMIC statement does when you are returning the code. Can you please give me a brief explanation? Thanks and sorry for the confusion.
I am not sure I understand what the Blockly.ORDER_ATOMIC statement does when you are returning the code. Can you please give me a brief explanation? Thanks and sorry for the confusion.
ValeT,
When adding, dividing,... a certain order is used by the processor (as in regular math expressions) to execute the line. A multiply will be executed before a summation. While braces override everything.
Depending on the order you return with your code Blockly will add braces to make sure the order stays correct.
This is mainly important when writing the commands for adding, dividing,... Atomic is the smallest possible unit that can never be split up, so Blockly will not put braces around it. If you would use other levels, it might happen it adds them while its unnecessary.
The numeric value is what Blockly uses to determine the level. A lower number has a higher priority.
I hope this clears things up.
Something on the side:
With the latest build of BlocklyProp the Blockly C version wouldn't load. This was because in framec.html you referred to debug_lcd.js while you called the file debug_LCD.js.
It works on your computer (an mine) as we develop using Windows. Unlike Linux (what the server runs on where BlocklyProp is hosted), Windows is case insensitive.
Please to remember to write your code case sensitive.
Thank you
Thanks for the explanation. I believe that I understand when I need to use it and when not to.
Sorry, about the spelling error; I have corrected it and made sure that none of my other additions have that mistake in them. Thanks for alerting me of this, I will try not to do it again
Quick question. I have almost completed adding all of the sensors that have C code documentation on Parallax's website to BlocklyProp. For the sensors that don't have C code documentation, should we just ignore them right now or should I experiment with them and then add what I can come up with to Blockly?
Quick question. I have almost completed adding all of the sensors that have C code documentation on Parallax's website to BlocklyProp. For the sensors that don't have C code documentation, should we just ignore them right now or should I experiment with them and then add what I can come up with to Blockly?
Thanks.
ValeT,
I think we should add blocks for sensors, chips and actuators that are not in the original C code documentation. Just be sure everything works.
But I think we should add a bit more Spin blocks before doing that. There was a request to prioritize the C blocks a bit, but I would like to go to a more even progression of both editor.
I think we should add blocks for sensors, chips and actuators that are not in the original C code documentation. Just be sure everything works.
But I think we should add a bit more Spin blocks before doing that. There was a request to prioritize the C blocks a bit, but I would like to go to a more even progression of both editor.
Thanks for the help,
Michel
Sounds like a plan.
Right now, I am in the works adding a number of Spin blocks but am having a little trouble with the Spin code since I have never used Spin before. It will just take me a little more time to get them correct.
On a side note, the project creation windows are looking great!
Right now, I am in the works adding a number of Spin blocks but am having a little trouble with the Spin code since I have never used Spin before. It will just take me a little more time to get them correct.
On a side note, the project creation windows are looking great!
Thanks, It's far from done, but changing to a wizard format is needed to have space for the new features.
Definitely. What is your plan for selecting features? I am wondering because it could get very confusing if you have a ton of different options.
Have a great Thanksgiving!
The first thing I want to implement is the categories of blocks. So that the user can choose what sensors they want to use without having a toolbox that's to big.
Sadly no Thanksgiving over here, but a great Thanksgiving to you all!
The first thing I want to implement is the categories of blocks. So that the user can choose what sensors they want to use without having a toolbox that's to big.
Sadly no Thanksgiving over here, but a great Thanksgiving to you all!
Michel
Sorry; I forgot you were in Belgium.
If you want, I can work on adding the choice boxes/dialogs in the window. If you give me an example, I will be able to figure it out and copy/extend it to other blocks.
If you want, I can work on adding the choice boxes/dialogs in the window. If you give me an example, I will be able to figure it out and copy/extend it to other blocks.
Thanks,
ValeT
ValeT,
I don't just want to add a new checkbox each time we add a new block. So I'm still figuring out how to to do it in a generic way. It won't change anything to the definition of the blocks, it'll just change the "keepers" variable in the frameX.html file.
And I'll also need to create a way of saving it into the projects.
Also I noticed that the project dialog is still not 100%, it still sometimes blocks the browser. So I'll have to investigate that further before I continue to add new features.
It's been a pretty long time since this thread has been updated, and so I would like to make a small progress report. Since the last post, we have added a large number of new blocks. The current compatibility list is below.
Current compatibility list for sensors and hardware:
Propeller C
- PIR Sensor ( all Parallax PIR Sensors )
- Mutli-Cog ( start )
- Digital and Analog I/O support
- Serial connection ( initialize, transmit, receive )
- Freqout command
- Joystick
- Ping))) sensor
- Abdrive
- LCD ( currently, only 1 LCD can be attached )
- Servo
- MX2125 Acceleration sensor
- MMA7455 Acceleration sensor
- SF02 Laser Rangefinder
- Etape liquid sensor
Spin
- Ping))) sensor
- Digital and Analog I/O support
- Multi-Cog
- Serial connection ( initialize, transmit, receive )
- SF02 Laser Rangefinder
- Joystick
- MMA7455 Acceleration sensor
- Etape liquid sensor
- PIR Sensor
- Freqout command
- LCD ( currently, only 1 LCD can be attached )
- Servo
- Abdrive
I really like where the BlockyProp visual programming is heading, but when I tried it on my Activity Board it couldnt get it to compile. Am I a little to early to the party? I get "BlocklyPropClient not available" is there a step I'm missing.
I really like where the BlockyProp visual programming is heading, but when I tried it on my Activity Board it couldnt get it to compile. Am I a little to early to the party? I get "BlocklyPropClient not available" is there a step I'm missing.
Hi JCee,
Have you downloaded and installed the BlocklyPropClient yet? If not, you will need to download it and run the python script. Here is the link to the Github page: https://github.com/parallaxinc/BlocklyPropClient. On the right hand side of the page, you can download the zip file of the repository. Next, navigate to the directory and run 'python BlocklyPropClient.py' in terminal, or command line. This will require python though, and 3 library dependencies that can be installed by running the 'python InstallDependencies.py' script in command line or terminal.
We are planning to release v1.0 of Blockly and BlocklyPropClient by the end of March. When those are released, a compiled version of the Client will be available for download, so you will not need to do anything to get that setup.
Let me know if you have any further questions or need additional help,
ValeT
I downloaded the directories and ran the python scripts, but no joy. I guess I will wait a few weeks for the easy setup. Looking forward to the release!
I downloaded the directories and ran the python scripts, but no joy. I guess I will wait a few weeks for the easy setup. Looking forward to the release!
Ok!
If you do want to try and get it setup sometime earlier though, just let me know and I can walk you through the setup step by step.
I downloaded the directories and ran the python scripts, but no joy. I guess I will wait a few weeks for the easy setup. Looking forward to the release!
Hi JCee,
what operating system are you using? If it's a 64bit Windows I can provide you with a version within a day or so. For other systems it's a bit harder to get you a build.
These builds do not require python or any other dependencies.
For now, it does need the Prop-gcc compiler to be in your path if you want to be able to compile a C program. (The spin compiler is included)
I started playing around with this in prep for the S3.
Set up a log-in on BlocklyProp per the link. Reminded myself of my github log in info. Loaded the client.
Then I used my QuickStart Board and played with the serial terminal. Fun stuff.
I am having some formatting issue with the old (desktop) and the new browser based serial terminal. For instance - in the browser based version Mitchell's Serial Terminal Code places "13" back on the same line as 10 (but in the 0 postion) - all else works as it should. This does not happen with the old Desktop Parallax Serial Terminal. Any ideas?
I get similar results with my modified code which prints 1 - 24 slowly in the terminal (so you can watch in work) Placement as above in the console (incorrect) and in the Parallax Serial Terminal (correct). Not sure why the mistake happens in the console serial terminal...
Yes, I see the issue now. There are several GitHub issues around the console now and Michel plans on deploying a new version to the Demo site by this weekend.
Yes, I see the issue now. There are several GitHub issues around the console now and Michel plans on deploying a new version to the Demo site by this weekend.
I'll test it out! And keep my eyes on the GitHub issues.
I have downloaded the Beta and Ican compile and download.
But Blockly does not work for me because I am using my P8XBlade2 board which runs at 96MHz (8*12MHz). Can I change the default somewhere?
What does Blockly compile to (Spin, C to CMM/LMM)?
Can Blockly use spin or pasm objects?
I have built an Otto/Zowi/Bob Bot with my grandsons. It runs with an Arduino and I thought it might be good to get them interested in programming the Bot with Blockly and the Propeller.
Comments
Does Parallax have a road map for BlocklyProp we should be following? I am asking because right now I am just adding random blocks without much of a plan.
How do I add global variables? I know that to add variables inside methods you use setups, but I can't seem to figure out how to add global variables.
For example, all of the cogs that are declared should be declared as global integers allowing other methods to stop the cogs under certain conditions.
ValeT,
For reference: the code is:
int *cog = cog_run(&method, 10);
If you declare a variable it will always be global. Blockly has no support for local variables. Because you need a pointer (I think by seeing the star in the command), you can't use the current variable system.
But you're in luck, I've been extending Blockly so that you will be able to use those in the future.
If you can wait a little while until I can test it thouroughly I'll check it in. Then you'll be able to extend it to use for cog_run.
Michel
ps: please spell my name correctly. There's no 'a' in my first name.
Thanks for working on that. Let me know if you need any help.
Sorry for spelling your name wrong!
ValeT,
I'm already happy that someone's helping to create blocks. It's not really a hard job (I hope to once automate that partly) but there's a lot to do.
It permits me to focus on the larger parts. I'll get back to the way a project is created once I've finished the pointers.
Blocks will then be categorized and will only be available if the category is selected in the project. This way the list of blocks will be limited to what the user actually wants to use, improving toolbox overview.
Michel
That sounds like a great idea! Its going to be needed; the Sensors tab will be huge by the time I am finished with it
I am not sure I understand what the Blockly.ORDER_ATOMIC statement does when you are returning the code. Can you please give me a brief explanation? Thanks and sorry for the confusion.
ValeT,
When adding, dividing,... a certain order is used by the processor (as in regular math expressions) to execute the line. A multiply will be executed before a summation. While braces override everything.
Depending on the order you return with your code Blockly will add braces to make sure the order stays correct.
This is mainly important when writing the commands for adding, dividing,... Atomic is the smallest possible unit that can never be split up, so Blockly will not put braces around it. If you would use other levels, it might happen it adds them while its unnecessary.
The possible orders (as defined in propc.js):
The numeric value is what Blockly uses to determine the level. A lower number has a higher priority.
I hope this clears things up.
Something on the side:
With the latest build of BlocklyProp the Blockly C version wouldn't load. This was because in framec.html you referred to debug_lcd.js while you called the file debug_LCD.js.
It works on your computer (an mine) as we develop using Windows. Unlike Linux (what the server runs on where BlocklyProp is hosted), Windows is case insensitive.
Please to remember to write your code case sensitive.
Thank you
Michel
Thanks for the explanation. I believe that I understand when I need to use it and when not to.
Sorry, about the spelling error; I have corrected it and made sure that none of my other additions have that mistake in them. Thanks for alerting me of this, I will try not to do it again
Quick question. I have almost completed adding all of the sensors that have C code documentation on Parallax's website to BlocklyProp. For the sensors that don't have C code documentation, should we just ignore them right now or should I experiment with them and then add what I can come up with to Blockly?
Thanks.
ValeT,
I think we should add blocks for sensors, chips and actuators that are not in the original C code documentation. Just be sure everything works.
But I think we should add a bit more Spin blocks before doing that. There was a request to prioritize the C blocks a bit, but I would like to go to a more even progression of both editor.
Thanks for the help,
Michel
Sounds like a plan.
Right now, I am in the works adding a number of Spin blocks but am having a little trouble with the Spin code since I have never used Spin before. It will just take me a little more time to get them correct.
On a side note, the project creation windows are looking great!
Thanks, It's far from done, but changing to a wizard format is needed to have space for the new features.
Definitely. What is your plan for selecting features? I am wondering because it could get very confusing if you have a ton of different options.
Have a great Thanksgiving!
The first thing I want to implement is the categories of blocks. So that the user can choose what sensors they want to use without having a toolbox that's to big.
Sadly no Thanksgiving over here, but a great Thanksgiving to you all!
Michel
Sorry; I forgot you were in Belgium.
If you want, I can work on adding the choice boxes/dialogs in the window. If you give me an example, I will be able to figure it out and copy/extend it to other blocks.
Thanks,
ValeT
ValeT,
I don't just want to add a new checkbox each time we add a new block. So I'm still figuring out how to to do it in a generic way. It won't change anything to the definition of the blocks, it'll just change the "keepers" variable in the frameX.html file.
And I'll also need to create a way of saving it into the projects.
Also I noticed that the project dialog is still not 100%, it still sometimes blocks the browser. So I'll have to investigate that further before I continue to add new features.
Michel
If possible, we need some people to test the system and open issues if anything is wrong ( link for issues area on Github: https://github.com/parallaxinc/BlocklyProp/issues ).
Current compatibility list for sensors and hardware:
Propeller C
- PIR Sensor ( all Parallax PIR Sensors )
- Mutli-Cog ( start )
- Digital and Analog I/O support
- Serial connection ( initialize, transmit, receive )
- Freqout command
- Joystick
- Ping))) sensor
- Abdrive
- LCD ( currently, only 1 LCD can be attached )
- Servo
- MX2125 Acceleration sensor
- MMA7455 Acceleration sensor
- SF02 Laser Rangefinder
- Etape liquid sensor
Spin
- Ping))) sensor
- Digital and Analog I/O support
- Multi-Cog
- Serial connection ( initialize, transmit, receive )
- SF02 Laser Rangefinder
- Joystick
- MMA7455 Acceleration sensor
- Etape liquid sensor
- PIR Sensor
- Freqout command
- LCD ( currently, only 1 LCD can be attached )
- Servo
- Abdrive
Hi JCee,
Have you downloaded and installed the BlocklyPropClient yet? If not, you will need to download it and run the python script. Here is the link to the Github page: https://github.com/parallaxinc/BlocklyPropClient. On the right hand side of the page, you can download the zip file of the repository. Next, navigate to the directory and run 'python BlocklyPropClient.py' in terminal, or command line. This will require python though, and 3 library dependencies that can be installed by running the 'python InstallDependencies.py' script in command line or terminal.
We are planning to release v1.0 of Blockly and BlocklyPropClient by the end of March. When those are released, a compiled version of the Client will be available for download, so you will not need to do anything to get that setup.
Let me know if you have any further questions or need additional help,
ValeT
Ok!
If you do want to try and get it setup sometime earlier though, just let me know and I can walk you through the setup step by step.
Hi JCee,
what operating system are you using? If it's a 64bit Windows I can provide you with a version within a day or so. For other systems it's a bit harder to get you a build.
These builds do not require python or any other dependencies.
For now, it does need the Prop-gcc compiler to be in your path if you want to be able to compile a C program. (The spin compiler is included)
Michel
I started playing around with this in prep for the S3.
Set up a log-in on BlocklyProp per the link. Reminded myself of my github log in info. Loaded the client.
Then I used my QuickStart Board and played with the serial terminal. Fun stuff.
I am having some formatting issue with the old (desktop) and the new browser based serial terminal. For instance - in the browser based version Mitchell's Serial Terminal Code places "13" back on the same line as 10 (but in the 0 postion) - all else works as it should. This does not happen with the old Desktop Parallax Serial Terminal. Any ideas?
Whatever you think is best...
So - here is the issue - If I use the Serial terminal (michell) - see photo,
I load to EEPROM to my QuickStart and run in the terminal console, I get the misplace line for "13" - see photo.
If I run in on the Parallax Serial Terminal (old desktop version), I get a properly formatted list - see photo.
I'll test it out! And keep my eyes on the GitHub issues.
Thanks!
I have downloaded the Beta and Ican compile and download.
But Blockly does not work for me because I am using my P8XBlade2 board which runs at 96MHz (8*12MHz). Can I change the default somewhere?
What does Blockly compile to (Spin, C to CMM/LMM)?
Can Blockly use spin or pasm objects?
I have built an Otto/Zowi/Bob Bot with my grandsons. It runs with an Arduino and I thought it might be good to get them interested in programming the Bot with Blockly and the Propeller.