GithubHelp home page GithubHelp logo

taweili / ardublock Goto Github PK

View Code? Open in Web Editor NEW
410.0 410.0 292.0 23.25 MB

ArduBlock is a Block Programming Language for Arduino.

License: GNU General Public License v3.0

Shell 0.33% C++ 9.82% Arduino 2.82% Java 86.99% Ruby 0.05%

ardublock's People

Contributors

aarn avatar danielfsc avatar facchinm avatar haobug avatar heqichen avatar joselorente avatar karlth avatar ldgneto avatar leoyan avatar taweili avatar tonycallear avatar vedes avatar wheels123 avatar xeecos avatar zvikapika avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ardublock's Issues

Open file

With the latest beta version of Ardublock (20131031), I can't open the latest file I have done with the precedent version of Ardublock.
And the block does not open too.

ardublock problem

Checking the Translation working properly with new Workspace

新的OpenBlocks已经把Workspace独立出来了,我把一些代码改了,基本上编译过,可以执行,但是还没有详细检查输出的部分。新的openblocks里面把Workspace独立出来了,现在一个程序里面可以有好几个Workspace了,你的Translator的架构我稍微改了一下,传了workspace。另外比之前用的Block.getBlock(blockId)已经没有了,这个该在workspace.getEnv().getBlock(blockId).

Memory issues with Ardublock v20131031 and Arduino 1.5.5

When I try and open a second sketch (.ino NOT an .abp), I'm getting a stack heap error when ardublock v20131031 is installed as a tool. (Windows 8.1) Not sure if the problem is a memory leak with ardublock, or the allocated memory in configuration.txt needs to be increased. Problem goes away if I rename the tools directory (holding ardublock) to "fubar-tools"

Here's an example error.

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at javax.swing.JScrollPane.createViewport(Unknown Source)
at javax.swing.JScrollPane.(Unknown Source)
at edu.mit.blocks.codeblockutil.CTracklessScrollPane$1.(CTracklessScrollPane.java:146)
at edu.mit.blocks.codeblockutil.CTracklessScrollPane.(CTracklessScrollPane.java:148)
at edu.mit.blocks.codeblockutil.CPopupMenu.(CPopupMenu.java:41)
at edu.mit.blocks.codeblockutil.LabelWidget$LabelMenu.(LabelWidget.java:511)
at edu.mit.blocks.codeblockutil.LabelWidget$LabelMenu.(LabelWidget.java:506)
at edu.mit.blocks.codeblockutil.LabelWidget.(LabelWidget.java:52)
at edu.mit.blocks.renderable.BlockLabel$1.(BlockLabel.java:81)
at edu.mit.blocks.renderable.BlockLabel.(BlockLabel.java:81)
at edu.mit.blocks.renderable.SocketLabel.(SocketLabel.java:15)
at edu.mit.blocks.renderable.RenderableBlock.synchronizeSockets(RenderableBlock.java:544)
at edu.mit.blocks.renderable.RenderableBlock.(RenderableBlock.java:249)
at edu.mit.blocks.renderable.RenderableBlock.(RenderableBlock.java:186)
at edu.mit.blocks.renderable.FactoryRenderableBlock.(FactoryRenderableBlock.java:40)
at edu.mit.blocks.workspace.PageDrawerLoadingUtils.loadBlockDrawerSets(PageDrawerLoadingUtils.java:236)
at edu.mit.blocks.workspace.Workspace.loadWorkspaceFrom(Workspace.java:849)
at edu.mit.blocks.controller.WorkspaceController.loadFreshWorkspace(WorkspaceController.java:397)
at com.ardublock.core.Context.resetWorksapce(Context.java:110)
at com.ardublock.core.Context.(Context.java:76)
at com.ardublock.core.Context.getContext(Context.java:63)
at com.ardublock.ui.OpenblocksFrame.(OpenblocksFrame.java:71)
at com.ardublock.ui.ArduBlockToolFrame.(ArduBlockToolFrame.java:3)
at com.ardublock.ArduBlockTool.init(ArduBlockTool.java:28)
at processing.app.Editor.addTools(Editor.java:824)
at processing.app.Editor.buildToolsMenu(Editor.java:693)
at processing.app.Editor.buildMenuBar(Editor.java:486)
at processing.app.Editor.(Editor.java:212)
at processing.app.Base.handleOpen(Base.java:846)
at processing.app.Base.handleOpen(Base.java:811)
at processing.app.Base$8.actionPerformed(Base.java:1604)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

Capital letter standardization

"I2C Write" and "I2C Read" are both capitalized but then "I2C read ok?" is not. I think it should all be lowe-case?

Also - under Storage --> Read and Write EEPROM and Address Data and File should also be lower-case

BLE_Shield --> "Data Available" should be "data available"

TinkerKit blocks don't generate "real" TinkerKit code

First, I have to say: great job on ArduBlock! I was able to get it running in no time and everything works.

I'm using an Arduino Uno with TinkerKit, and I noticed that the code ArduBlock generates for TinkerKit blocks is not "real" TinkerKit code. It uses the constants like "O1", "I1", etc but it doesn't use the TinkerKit objects and methods like "TKButton.pressed()". Instead, the generated code is "analogRead(I1)>512?true:false". I took a quick look at the source and it seems this should be pretty easy to improve, but I can't be sure without more investigation.

No suitable variable for millis() ?

millis() returns an 'unsigned long' but these aren't available in the 'variables' draw.

Unless there's something I missed?

pull request to fix this available.

(Sorry if I’m getting the etiquette of this wrong – just starting out – happy to be corrected)

clone of math operators does not refresh

If you have anything with a math or a logical operator and try to clone it - the number variable \ value field doesn't refresh to fit the contents. This can get really messy - as we saw with some students' projects last week as they were trying to add some pretty awesome capability to their programs.

image

pb with block "/"

Hi,
there is a pb with the block "/", it appears like "A." ... maybe the traduction ?

Ardublock crashes with uncaught exception

Hey guys, amazing work you are doing. I was just curious and obviously driven by the attractive graphic interface you've got.

My setup is OSX 10.5.8 and it crashes when I launch Arduino (1.5 I think )

The log says " java.lang.NoClassDefFoundError: javax/swing/filechooser/FileNameExtensionFilter

May be my Arduino is not 100% standard or my Java version is not what .jar was expecting. .. any clues?

picture 5

Small errors for the translation

There are some errors on some blocks for the translation :

  • block loop : "do" is not translated
  • blocks with "status" : "high" is not translated (digital output, tinker relay / transistor, dfrobot relay) and "on" is not translated too ( tinker del, dfrobot del / piranha)

Support for TinkerKit

TinkerKit library: https://github.com/TinketKit/TinkerKit

需要支持I0...5, O0...5, 在使用TinkerKit的blocks的时候,#include "TinkerKit.h" 以防他们未来改变。另外,增加个I0...I5和O0...O5的blocks这样用TinkerKit的时候就直接使用I/O而不是Arduino的pin number.

Blocks get un-attached...

If you move the blocks around - and drag past the edge of the window, the blocks become un-attached.

image

The image attached shows the blocks - they're still "attached" to the main set digital pin block - but they're not near it? If I do a "organize all blocks" it re-fixes the number and boolean blocks back.

Hebrew Translation not recognized?

I've tried translating ArduBlock to Hebrew.
After translating a small portion (14%) of the files, I've tried to test my translations as explained in the block entry:
http://blog.ardublock.com/2013/08/16/how-to-test-translations-locally/
Unfortunately, following the instructions didn't show any sign that the translation files were picked up.
I created the required com/ardublock/block/ardublock_he.properties file, ran it using:
java -Duser.language=he -cp .:ardublock-all.jar com.ardublock.Main
but it there were no apparent changes in the ardublock run.

I also tried:

  1. Adding the file directly to the JAR file - didn't matter
  2. renaming it ardublock_he_IL.properties, runnign it using:
    java -Duser.language=he -Duser.country=IL -cp .:ardublock-all.jar com.ardublock.Main - also didn't change anything.
  3. renaming the file into ardublock-de.properties, letting it override the original german translation - the result was that no ardublock windows got opened at all.
  4. renaming ardublock_de.properties into ardublock_he.properties (the opposite of 3 above) - the file was ignored, and ardublock opened in English.

I got my translation file directly from crowdin, as explained in the blog.

Help text for the For loop has a typo

Also it's a bit confusing to say that you are repeating the commands for "times"

Maybe it should be something like: "Repeat the commands for n times" with variable assigned to the count.

Our test group found this to be a bit confusing of a command structure - more testing needs to be done on how this block will be used.

image

Adding "Save as"-Button?

Hi,
could it be possible to add an "Save as"-Button? - If you are programming, you will normally load an old program and you will modify it. If you have a "Save as"-Button, you can do it. Now, you have to copy the programm with your filemanager, you can't do it with Ardublock. That's inconvenient... ;-(

'Write ro SD' doesn't compile (tiny problem)

'Write to Sd' generates code that creates "dataFile" but then refers to "datafile" with lower case 'f'.

File dataFile = SD.open("gh.txt", FILE_WRITE);
if(datafile){
    datafile.print( "Message" );
    datafile.print(" ");
    datafile.println("");
    datafile.close();
}

Feature request (Or I've missed something)

I can't find a way to turn off block connectors normal behaviour of 'able to be dragged away', I think that would be a good way of setting parameters in a block that just don't make sense anywhere else.Something that will increasingly crop up as more hardware support is added?

Would it be possible to have this feature? Have I missed something? Or is there a better way to do what I want?

Here's why, just for now...
I've been changing the "Servo" block so that it copes better with the actual servos we're using (they all need extra parameters in the call to 'attach' to get anything like 180 degree rotation from them). It looks like this.
servoblock-tc2

I've used 'string-list' for the top connector to stop garbage being attached but it can still be dragged away and discarded - and I then have to provide a way of putting it back which takes up room in the 'Draw' and shouldn't really be needed.

Probably the same arguement for the middle connector as well.

Enhancement request: Add threading library to support multiple loops

One of the benefits of Ardublock and all the other scratch-like environment is the ease and clarity of the solution that can be expressed by them.
Creating multiple loop blocks would be the obvious approach by anyone who is not aware of the underlying implementation of (Arduino setup()/loop() pair).

Has any one you considered incorporating one of the available Arduino threading libraries (I can see several here: http://playground.arduino.cc//Main/LibraryList#Sched , not including full RTOS as those mentioned here: http://forum.arduino.cc/index.php?topic=91181.0).

I think a simple cooperative multitasking scheme can be created by detecting each delay() call within a loop, and separating the loop into multiple function, with each part, separated by delay() calls the next function in the sequence using the thread scheduler and the desired delay.

Multiple loops can then be supported by having the main loop schedule all loops defined.

Has anyone ever considered adding this?

Support for Roomba

From Byron,

Mike McCauley wrote a library that encapsulates serial commands to the Roomba. ( http://www.open.com.au/mikem/arduino/Roomba/index.html ) The library wraps a serial protocol with higher level functions. It runs on Arduino. The header file has a nice description of the functions: http://www.open.com.au/mikem/arduino/Roomba/Roomba_8h-source.html

It was my intent to further wrap this class with an even higher level class to make it easier to use from Ardublocks- so that you could specify blocks like left/right, etc...

EEPROM blocks issues and feature request.

(1) Blocks for EEPROM.write and EEPROM.read only work correctly with constants – not variables, math operations, etc. AFAICT. I have a fix for this if needed

(2) I’d really like EEPROM blocks to normally read/write ‘int’s, rather than ‘byte’s, as much else just assumes ‘int’s.

(3) Blocks to read/write unsigned longs would be useful too i.e. recording times from millis()

Is it OK to work on (2) or (3)?

Note::Please close/reject my previous issue "'EEPROM.write' max value for 'data' is wrong" as that one is pointless

Error messages are inconsistent

Out of my own carelessness, I accidentally switched the variable name and the assignment value with the "set digital var" and "set number var" commands.

When you do this with the set number var the error comes back:

"digital var must be digital var"

if you do this with the "set digital var" block, you get the error:

"var must be var"

if you do this with the create array command - it bonks, but doesn't tell you...

Blocks in setup()

Blocks in the setup() are not being properly parsed? If I put the following:

image

the code that's generated looks like this:

void setup()
{
pinMode( 5 , OUTPUT);
digitalWrite( 5 , HIGH );

delay( 1000 );

digitalWrite( 5 , LOW );

}

Okay - maybe it's not a big deal that the second delay is missing? but, it gets worse. This:

image

should blink twice, right? but, the generated code still looks like:

void setup()
{
pinMode( 5 , OUTPUT);
digitalWrite( 5 , HIGH );

delay( 1000 );

digitalWrite( 5 , LOW );

}

This was tested with the latest release

This problem does not appear to be an issue with the 1006 release.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.