pneumatic seeder
- 
					
					
					
					
 Hi, 
 i've just discovered M5stack, great product !I am a farmer and I produce organic vegetables. 
 I have a project of pneumatic seed drill with venturi effect.
 I know a little arduino but not at all micropython.
 I am a little lost, I would like to know where to start my project.
 I have to control stepper motors and a solenoid valve.I would like to start simply by programming a stepper motor to advance a conveyor belt. Any ideas to help me? 
 thank you very much
- 
					
					
					
					
 There is an Arduino IDE stepper motor example listed on the M5stack site - I think it links to this forum. It is very simplistic, controlling a stepper to make a simple "clock" but it should be enough to get you started. 
- 
					
					
					
					
 Hello, thank you Julian, i've tried this sample. It work fine. 
 But is there a sample of this code with comments too really understand each part ?
 Is there some exemples with "fritzing" draw ?thank you. 
- 
					
					
					
					
 Hello again, 
 i've made a sketch on arduino ide to control a nema 17 stepper motor with the shield L298Nhere is the sketch : 
 /*
 Controle de moteur pas à pas avec un L298N
 Le moteur est connecté sur les broches 2,3,4 et 5 de l'Arduino
 Le fil de masse (GND) est commun aux 2 platines.
 */#include <Stepper.h> const int NbPasParTour = 200; // Nombre de pas pour 360 degres 
 Stepper Moteur1(NbPasParTour, 2, 3, 4, 5); // Initialise le moteur sur les broches 2 à 5void setup() 
 {
 Moteur1.setSpeed(60); //Vitesse de rotation du moteur
 Serial.begin(9600); //Initialise le moniteur série
 }void loop() 
 {
 Serial.println("Sens horaire"); //On fait 1 tour en sens horaire
 Moteur1.step(NbPasParTour);
 delay(1000); //Pause 1 secondeSerial.println("Sens anti-horaire"); //On fait 1 tour en sens anti-horaire 
 Moteur1.step(-NbPasParTour);
 delay(1000); //Pause 1 seconde
 }It's work fine ! But when i try on the m5, on the PIN 3, 1, 16, 17 with this sketch, the motor only vibrate : 
 /*
 Controle de moteur pas à pas avec un L298N
 Le moteur est connecté sur les broches 3, 1, 16, 17 du m5
 Le fil de masse (GND) est commun aux 2 platines.
 */
 #include <M5Stack.h>
 #include <Stepper.h>const int NbPasParTour = 200; // Nombre de pas pour 360 degres Stepper Moteur1(NbPasParTour, 3, 1, 16, 17); // Initialise le moteur sur les broches void setup() 
 {
 Moteur1.setSpeed(100); //Vitesse de rotation du moteur
 m5.begin();
 M5.Lcd.setBrightness(200);M5.Lcd.setTextColor(0xffff); 
 M5.Lcd.setTextSize(3);
 M5.Lcd.setCursor(50, 20);
 M5.Lcd.print("M5 Seeder");
 }void loop() 
 {
 M5.Lcd.setTextColor(0x7bef);
 M5.Lcd.setTextSize(2);
 M5.Lcd.setCursor(55, 60);
 M5.Lcd.print("Sens horaire");
 Moteur1.step(NbPasParTour*2);
 delay(1000); //Pause 1 secondeM5.Lcd.setTextColor(0x7bef); 
 M5.Lcd.setTextSize(2);
 M5.Lcd.setCursor(55, 60);
 M5.Lcd.print("Sens anti-horaire");
 Moteur1.step(-NbPasParTour);
 delay(1000); //Pause 1 secondem5.update(); 
 }Any idea ? 
 thank you