Running Arduino on the BrainPad

Partial success: I can now use Serial.println to get messages from the BrainPad through a GHI Rs232 Module to the Serial Port of my PC.
The RS232 Module is connected to PA2 of the BrainPad as TX (Expansion Header Pin 15 (INT).

void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.println(“test test test\r\n”);
delay(1000);
}

However, if I activate in the Arduino IDE Tools -> Other Serial Instance: ALL or Serial1(if available) or Serial2(if available)
I get a compiler error:

Arduino: 1.8.3 (Windows 10), Board: “Nucleo-64, Nucleo F401RE, Mass Storage, All, None”

arm-none-eabi-gcc: error: C:\Users\Roland\AppData\Local\Temp\arduino_build_963841/…\arduino_cache_729421\core\core_STM32_stm32_Nucleo_64_board_part_num_NUCLEO_F401RE,
upload_method_MassStorageMethod,Other_serial_enable_SerialAll,USB_interface_enable_USB_ba6ca7138be2b72e751689a40e15ca39.a:
No such file or directory

exit status 1
Fehler beim Kompilieren für das Board Nucleo-64.

Next step is to control the display.
Would be nice to get some information from GHI.

There is a whole tech talk about this display. The very first tech talk

Thanks, I will have a look on it tomorrow.

Tried to adapt the Adafruit Adafruit_SSD1306 I2C library for the STM32F401 Mainboard, but no success.
The BrainPad display works fine on an Arduino Pro mini with the Adafruit library.
Does anybody have an Arduino library that works on the STM32F401 Mainboard?

@RoSchmi

you need to modify file variant.h on

C:\Users\USERNAME\AppData\Local\arduino15\packages\STM32\hardware\stm32\2017.8.4\variants\NUCLEO_F401RE\

i done for you so you need to just replace this file with installed ones
(i put an arduino sample,modified file variant.h ,ssd1306 library for arduino,also compiled firmware) just donwload from [CLIK TO DOWNLOAD THERE]
(https://drive.google.com/drive/folders/0B5LeqLuG9sGGd0dJVEd1c21ENDg?usp=sharing)

1 Like

Still no success. Is it correct, that only variant.h must be exchanged and not the entire NUCLEO_401RE folder?

Yes only variant.h

Hmm, the oled on the new BrainPad seems to be a 128x32 display (on an Arduino Pro Mini it works with this configuration). Your example was for a 128x64 display. Did you get it working on the new BrainPad or on a Nucleo-401RE board? Could you please send me a copy of your …\variants\NUCLEO_F401RE folder? If this doesn’t help, I would have to search systematically for the reason.

Still not received brainpad but
NUCLEO 411 yes

But i test a lot of app with Arduino Ide
and Nucleo Stm32f411 (401 is little lite on speed and ram than 411 otherwiese are same)

With the oscillosope I see no spikes on I2C lines of the oled display with the Arduino App. When I use a BrainPad TinyCLR App I can see spikes when I write on the display.
Something seems to be wrong with the pin definitions.

Yes i forgot one thinggggggg

pinnames.h should be pullup for i2c pins but i will send to you info when i go home

1 Like

Are you relying only on internal pullups for i2c??

Some implementations may need stronger pullups. I had to use 1k pullups with multiple MCP23017’s on a bus. Datasheet will tell you definitively (in that case MCP’s datasheet recommended 1k on those, not 2.2k)

I suggest to continue the discussion about the oled display in a separate thread.


This thread should not be overfreighted with too many details.

1 Like

Today I Received Brainpad so from today i will test and check and re-create all examples from ghi to arduino ide and 2 mbed variants (one with vs2017 and visualgdb)(another one with online mbed compiler) and i will publish them at github with instructions.

2 Likes

I tested some samples with i2c ssd1306 and i can confirm code that working for Nucleo STM33F411 do not work on Brainpad version compiled for Nucleo STM32F401 even with pullup version as you say.

I’m going next test I2C scanner to see what detect it.

O.K., the Adafruit_ssd1306_128x64 library now works perfectly on the BrainPad.

And here is my first Project with the BrainPad running Arduino Code

4 Likes

And here is, how the BrainPad can be programmed via the serial SWD Interface

1 Like

And here is Buzzer, Lightsensor, Temperaturesensor, and Accelerometer

5 Likes