Ardublockly Blocks not visible

98 views
Skip to first unread message

Rimish Bansod

unread,
Jun 18, 2016, 7:29:15 AM6/18/16
to Blockly
Hello Sir,
I am using Ardublockly.
I have made following changes in ardublockly
I am using Web version of Ardublockly
1)There was not any option for Nano board so I added Nano Board Option in setting and I did following changes to code.

Step - 1 
Go to ardublockly/classic/settings.html
In the ‘Arduino Board’ selection form, a new is required whose value is ‘nano’.

Step - 2
Go To ardublocklyserver/compilersettings.py
There is a __Arduino_type array which needs to include
'Nano': 'arduino:avr:nano'
as an option.
Step - 3
Go To blockly/generators/arduino/boards.js

This defines the properties for the different support boards, so an entry for the Nano is required. This is largely the same as the ‘uno’ entry, but the Nano has two additional analogue pins. This is unverified, as I’m not an Arduino expert (to use at your own risk), but I believe all that is required is to create an entry as follows:

/** Arduino Nano Board Profile */
Blockly.Arduino.Boards.Profiles.nano = {
name: 'Arduino Nano',
description: 'Arduino Nano with ATmega328p board',
compilerFlag: 'arduino:avr:nano',
analogPins: Blockly.Arduino.Boards.generateAnalogIo(0, 7),
digitalPins: Blockly.Arduino.Boards.generateDigitalIo(0, 13).concat(
Blockly.Arduino.Boards.generateAnalogIo(0, 7)),
pwmPins: [['3', '3'], ['5', '5'], ['6', '6'], ['9', '9'], ['10', '10'],
['11', '11']],
serial: [['serial', 'Serial']],
serialPins: { Serial: [['RX', '0'], ['TX', '1']] },
serialSpeed: [['300', '300'], ['600', '600'], ['1200', '1200'],
['2400', '2400'], ['4800', '4800'], ['9600', '9600'],
['14400', '14400'], ['19200', '19200'], ['28800', '28800'],
['31250', '31250'], ['38400', '38400'], ['57600', '57600'],
['115200', '115200']],
spi: [['SPI', 'SPI']],
spiPins: { SPI: [['MOSI', '11'], ['MISO', '12'], ['SCK', '13']] },
spiClockDivide: [['2 (8MHz)', 'SPI_CLOCK_DIV2'],
['4 (4MHz)', 'SPI_CLOCK_DIV4'],
['8 (2MHz)', 'SPI_CLOCK_DIV8'],
['16 (1MHz)', 'SPI_CLOCK_DIV16'],
['32 (500KHz)', 'SPI_CLOCK_DIV32'],
['64 (250KHz)', 'SPI_CLOCK_DIV64'],
['128 (125KHz)', 'SPI_CLOCK_DIV128']],
i2c: [['I2C', 'Wire']],
i2cPins: { Wire: [['SDA', 'A4'], ['SCL', 'A5']] },
i2cSpeed: [['100kHz', '100000L'], ['400kHz', '400000L']],
builtinLed: [['BUILTIN_1', '13']],
interrupt: [['interrupt0', '2'], ['interrupt1', '3']]
};


After Adding this I have run the file called build.py inside blockly folder.

but after this some blocks was not visible in ardublockly.

Then I opened browser console and it was giving some errors.

How to solve above error

Is my procedure wrong for adding Nano Board to ardublockly If it is then what is the correct procedure and which file should I edit?

Reply all
Reply to author
Forward
0 new messages