[JacoBot] Arduino #4

Open
Adrien wants to merge 29 commits from Adrien/JacoBot:main into main
Member
No description provided.
Adrien added 1 commit 2024-04-06 13:43:13 +00:00
Adrien added 1 commit 2024-04-12 21:26:56 +00:00
Adrien changed title from [JacoBot] Motor encoder basic Arduino implementation with PID to [JacoBot] Arduino robot 2024-04-13 12:28:32 +00:00
Adrien added 1 commit 2024-04-13 15:34:30 +00:00
Adrien force-pushed main from 0f5ef1e24d to 4bb3c4bd90 2024-04-13 16:12:18 +00:00 Compare
Adrien force-pushed main from 4bb3c4bd90 to 0fdb58b6cc 2024-04-13 16:13:40 +00:00 Compare
Adrien added 1 commit 2024-04-13 16:42:41 +00:00
HS-157 added the
JacoBot
Hardware
labels 2024-04-15 12:40:32 +00:00
Adrien added 1 commit 2024-04-23 13:43:54 +00:00
Adrien changed title from [JacoBot] Arduino robot to [JacoPad/JacoBot] Arduino 2024-04-23 13:49:21 +00:00
Adrien added 1 commit 2024-04-23 17:06:28 +00:00
This reverts commit 97dd28a88a.

	deleted:    jacopad/arduino/README.md
	deleted:    jacopad/arduino/main.cpp
	deleted:    jacopad/arduino/token.cpp
	deleted:    jacopad/arduino/token.h
Adrien added 4 commits 2024-04-23 17:20:17 +00:00
Adrien changed title from [JacoPad/JacoBot] Arduino to [JacoBot] Arduino 2024-04-23 17:27:06 +00:00
benvii requested changes 2024-04-24 09:05:18 +00:00
benvii left a comment
Owner

Good job bro 💪, see my comment to make it a bit more readable.

Good job bro 💪, see my comment to make it a bit more readable.
@ -0,0 +3,4 @@
#include "MotorEncoder.h"
#define pi 3.1415
Car::Car(MotorEncoder* m1, MotorEncoder* m2, float distance)
Owner
  • Add comment see example bellow
  • m1 rename it to left or right
  • m2 rename it to right or left
/**
     * @brief Create a new instance of car
     *
     * This constructor initializes the a Car with 2 motors and the distance between 2 wheels.
     *
     * @param m1 ?
.....
     */
- [ ] Add comment see example bellow - [ ] m1 rename it to left or right - [ ] m2 rename it to right or left ```c++ /** * @brief Create a new instance of car * * This constructor initializes the a Car with 2 motors and the distance between 2 wheels. * * @param m1 ? ..... */ ```
Adrien marked this conversation as resolved
@ -0,0 +7,4 @@
: m_m1(m1), m_m2(m2), m_distance(distance) {
}
void Car::forward(float distance, double setPoint) { //distance : mm
Owner

Add doc string also, see style here : https://www.doxygen.nl/manual/docblocks.html

  • Use doxygen doc string
  • Explain what's the meaning of setPoint, i think it's the number of cycle / rotation ?
Add doc string also, see style here : https://www.doxygen.nl/manual/docblocks.html - [ ] Use doxygen doc string - [ ] Explain what's the meaning of setPoint, i think it's the number of cycle / rotation ?
Adrien marked this conversation as resolved
@ -0,0 +14,4 @@
double m2_duration = 0;
m_m1->setPoint = setPoint;
m_m2->setPoint = setPoint/m2_mmp*m1_mmp;
while(m1_duration<distance/m1_mmp && m2_duration<distance/m2_mmp) {
Owner

Compute this distance/m1_mmp and this distance/m2_mmp only once, store this before the while in 2 variables.

Compute this `distance/m1_mmp` and this `distance/m2_mmp` only once, store this before the while in 2 variables.
Adrien marked this conversation as resolved
@ -0,0 +32,4 @@
m_m2->stop();
}
void Car::turn(float angle, double setPoint) { //angle : degre
Owner
  • Tell that setPoint is the number of detection seen by the encodor between 2 correction (PWM computed changes).

  • Comment the method using doxygen

- [ ] Tell that setPoint is the number of detection seen by the encodor between 2 correction (PWM computed changes). - [ ] Comment the method using doxygen
Author
Member

I will put this in MotoEncoder.h

I will put this in MotoEncoder.h
Adrien marked this conversation as resolved
@ -0,0 +4,4 @@
class Car {
private:
float m_distance;// mm
Owner

Rename it to distance_between_wheels, add a comment it to indicate that it use to rotate right or left.

Rename it to distance_between_wheels, add a comment it to indicate that it use to rotate right or left.
Adrien marked this conversation as resolved
@ -0,0 +5,4 @@
class Car {
private:
float m_distance;// mm
MotorEncoder* m_m1;
Owner

Rename it to m_left or m_right.

Rename it to m_left or m_right.
Adrien marked this conversation as resolved
@ -0,0 +6,4 @@
private:
float m_distance;// mm
MotorEncoder* m_m1;
MotorEncoder* m_m2;
Owner

Rename it to m_left or m_right.

Rename it to m_left or m_right.
Adrien marked this conversation as resolved
@ -0,0 +3,4 @@
#include "Radio.h"
#include "MotorEncoder.h"
#include "Car.h"
Owner

Put all pins in constant using explicit naming :

#define  MLEFT_ENCODER_A       1
#define  MLEFT_ENCODER_B       1
Put all pins in constant using explicit naming : ``` #define MLEFT_ENCODER_A 1 #define MLEFT_ENCODER_B 1 ```
Adrien marked this conversation as resolved
@ -0,0 +29,4 @@
//car.forward(100,50);
}
void loop() {
Owner
  • Add TODO here indicating that some dev still need to be done to map radio messages to the right car movement, create an issue for that so that we don't forget it
- [ ] Add TODO here indicating that some dev still need to be done to map radio messages to the right car movement, create an issue for that so that we don't forget it
Adrien marked this conversation as resolved
@ -0,0 +12,4 @@
Serial.println("Error while initialise the NRF module");
while (1);
}
Serial.println("Module initialised");
Owner

Serial.println("Radio module initialised");

` Serial.println("Radio module initialised"); `
Adrien marked this conversation as resolved
benvii changed title from [JacoBot] Arduino to WIP: [JacoBot] Arduino 2024-04-24 09:09:02 +00:00
Adrien added 1 commit 2024-04-25 09:11:17 +00:00
Adrien added 1 commit 2024-04-25 09:51:41 +00:00
Adrien added 1 commit 2024-04-25 09:53:40 +00:00
benvii changed title from WIP: [JacoBot] Arduino to [JacoBot] Arduino 2024-04-25 13:16:47 +00:00
Adrien added 1 commit 2024-04-25 13:24:58 +00:00
Adrien added 1 commit 2024-04-25 19:44:05 +00:00
Adrien added 1 commit 2024-04-25 19:45:52 +00:00
Adrien added 1 commit 2024-04-25 20:11:14 +00:00
benvii was assigned by HS-157 2024-04-26 20:13:58 +00:00
Adrien added 1 commit 2024-05-06 20:44:09 +00:00
Adrien added 1 commit 2024-05-11 12:46:58 +00:00
benvii added 1 commit 2024-05-11 13:33:45 +00:00
Adrien added 1 commit 2024-05-11 14:58:35 +00:00
Adrien added 1 commit 2024-05-11 15:08:17 +00:00
Adrien added 1 commit 2024-05-11 19:38:07 +00:00
Adrien added 1 commit 2024-05-18 15:24:34 +00:00
Adrien added 1 commit 2024-05-18 15:28:56 +00:00
Adrien added 1 commit 2024-05-25 13:43:26 +00:00
Adrien added 1 commit 2024-05-25 13:48:48 +00:00
Adrien added 1 commit 2024-05-25 14:44:16 +00:00
benvii force-pushed main from 5f8c0a03ad to fa390c8530 2024-06-08 13:07:49 +00:00 Compare
benvii force-pushed main from fa390c8530 to b61f8b5648 2024-06-08 13:38:24 +00:00 Compare
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u main:Adrien-main
git checkout Adrien-main
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: MDL29/JacoBot#4
No description provided.