Cleanflight on STM32?

Hi EJbuilder,

I looked at my files on stm32 drones and realized they were very similar to the video you posted the link to. I have a couple of stm32 chips:

Do you want to try and put Cleanflight on this chip?

See you Saturday,

Bob

Accelerologger: error opening test.txt problem!!!

Now I have solved my silly mistake I have run into another problem!!!

I looked in the serial monitor and I am getting the:

error opening test.txt

Part of the code being carried out! Here is a Fritzing diagram of the Accelerologger:

The diagram is a bit messy but it’ll do to show the circuit config. I ran the default SD Card Reader code on it:

#include <SD.h>
#include <SPI.h>

File myFile;

int pinCS = 10;

void setup() {

Serial.begin(9600);
pinMode(pinCS, OUTPUT);

// SD Card Initialization
if (SD.begin())
{
Serial.println("SD card is ready to use.");
} else
{
Serial.println("SD card initialization failed");
return;
}

// Create/Open file
myFile = SD.open("test.txt", FILE_WRITE);

// if the file opened okay, write to it:
if (myFile) {
Serial.println("Writing to file...");
// Write to file
myFile.println("Testing text 1, 2 ,3...");
myFile.close(); // close the file
Serial.println("Done.");
}
// if the file didn't open, print an error:
else {
Serial.println("error opening test.txt");
}

// Reading the file
myFile = SD.open("test.txt");
if (myFile) {
Serial.println("Read:");
// Reading the whole file
while (myFile.available()) {
Serial.write(myFile.read());
}
myFile.close();
}
else {
Serial.println("error opening test.txt");
}

}
void loop() {
// empty
}

With this code, it worked perfectly. Here is the response received in the serial monitor:

SD card is ready to use.
Writing to file…
Done.
Read:
Testing text 1, 2,3…
Testing text 1, 2,3…
Testing text 1, 2,3…
Testing text 1, 2,3…
Testing text 1, 2,3…
Testing text 1, 2,3…

Geez!!! all these problems! I hope I eventually get to the bottom of them all!

Thanks for everyone’s help!

EJBuilder

test

In this tutorial, you will learn how to program your robot to come to you when you call it, and do a happy dance when you pat it!

In this task you will learn about working with the ultrasonic and touch sensors.

Note: As with last week, you will need to do some building for this challenge, but the emphasis is on programming!

The challenge

The idea for the tutorial is to create a robot that comes to you when you “call” it, and do a happy dance when you pat it!

1. Tutorial

2. Try it for yourself

Once you’ve watched the tutorial, have a go at creating your own version of this program that incorporates the two sample programs shown in the video.

Note: The EV3 kit doesn’t include a sound sensor, so in this tutorial we use the ultrasound sensor to call the robot by waving at it. If, however, you’ve got access to an old sound sensor, you’re welcome to try using that instead.

3. Share it!

Finally, create an entry for your team journal describing what you tried, including what worked and what didn’t.

If you’ve got something cool to share, then please take a screenshot of your program and add it to your team journal (use the Add Media button at the top of the screen when you’re editing your post).

 

Next: TLC