Hi,
I ported Arduino library for EK-RA4W1 on FSP. This is a minimal implementation yet.
You can enjoy your sketch e2studio as seen below screen shot.
How to get started
1. Download the following zip.
ra4w1_sketch_20210312.zip
2. Import the zip as archive file. This was exported as "FSP archive file"
3. Open the file "configuration.xml" and execute "Generate Project Content" on the upper right.
4. Open the file "sketch.cpp" in the arduino folder. That is it you sketch. You can see the first example for saying "Hello" on the serial monitor like TeraTerm.
5. Build it and connect to the debugger. It may be usual way, so I skip the detail way.
6. Run it !
You can see that the LED on EK blinks and say "Hello" in the serial monitor as below.
Ported as below so far:
- digitalWrite
- digitalRead
- analogWrite (only pin 3, 5 because unable to generate caused by conflicting on FSP with SPI pins)
- analogRead (pin A4 and A5 are not available)
- external interrupt (only pin 2 and SW are available as #0)
- Serial class (Serial is assigned to USB, Serial1 is assigned to pin 0, 1)
- SPI class
- Wire class
I had tested executing BLE stack with Arduino lib, but not included that because considering what service I should implement now.
I'd appreciate if you let me know how you feel. Thank you.
Hi Yuuki-san,
I just tried it out- I used Import Existing Project into Workspace and after generating Content it compiles without errors.
I don't get what I expect on the console- nothing displayed. Looking at the sketch it seems to be for a Mandelbrot drawer, not the Hello. Am I looking in the wrong place?
I'm sorry, had uploaded the testing one. I uploaded the correct one again.
The example code is the below one. So you don't need download again, please copy the below code to your sketch.cpp.
#include <Arduino.h>void setup(){ Serial.begin(9600); pinMode(PIN_LED0, OUTPUT);}void loop(){ Serial.println("Hello"); digitalWrite(PIN_LED0, HIGH); delay(100); digitalWrite(PIN_LED0, LOW); delay(100);}
Hi Yuuki-
Yes, this sketch works!
Thank you for posting your work. Let us know what progress you make on future ports. I will be interested in trying my own sketches and will post them here as well!