The trick is to avoid using floating point calculations(Calculations using float or double data type) and always use Integers because most functions only take integers as parameters.
Currently the distance in our program updates every 0.1 seconds. But our program behaves like we update every 1...
Yes, you are right. That is why I chose a time interval of 100ms (1/10th of a second). You only have to adjust your variables to be 10 times larger than reality which can be tricky.
Because of the formula for distance traveled from acceleration and velocity.
s = Vi×t + ½×a×(t^2)
Where
s = distance
Vi = velocity
t = time
a = acceleration
But because time is always (theoretically) 1 second when we calculate the distance we get:
s = Vi×1 + ½a×(1^2) = 1Vi + ½a×1 = Vi + ½a...
Yes, C++ is faster than Java in practically any application.
Also, I think that creating 3D objects and coloring them is done by the GPU. I don't know how deep you want to go into this. But you can either take advantage of the functions of an GPU or you make a program that also does the work of...
I am not familiar with PID controllers. But I would implement lineair acceleration like this:
int main {
int target_Position = 100;
int max_Velocity = 20;
int acceleration = 5;
int velocity = 0;
int position = 0;
for (int x = 0; x < max_velocity; x += acceleration) {
if (x >=...
The person in this Thread is making an 8-bit CPU in simulation software:
https://www.physicsforums.com/threads/how-does-ram-give-4-th-value-when-cpu-requests-the-001-th.801810/
Maybe he has the program you need.
I am sorry. But your description is not clear enough. From your code I can see your native language is Turkish and you probably cannot speak or write English too well. If you want to program on a professional level in the future I urge you to learn English.
In the professional world software is...
I don't know if that is true or not. I am not sure how an OS does memory management of arrays. Anyway, the optimizers can do a lot of scary things. Best practice to avoid this problem:
#include <iostream>
#include <fstream>
using namespace std;
int main() {
int array_limit = 10;
int...
First of all whenever you design or want to make something in VHDL it is good practice to first make a diagram in which you show your modules within your top module. You can keep track of your idea and maybe foresee problems in the process. And when you want to explain your design when you have...
When you convert your code to a program(machine language) your code goes through a "tool chain". In this tool chain there is the "optimizer". It looks at your code and changes it if it finds something that could pose a threat in your program. Perhaps the optimizer changed it so it would work up...
I am not sure what you mean with "j_max >= 15" but what may cause your crash is in the code you posted. In the program your for-loop variable "j" will exceed the pre-defined size of array "k".
This will give an array out of bounds error.
I do not think the sender and receiver communicate using the frequency of the "flicker". It most likely uses a protocol like RC5 for TV's. Because this is not a TV or other multimedia device I suspect the airconditioner uses the NEC IR protocol. Unfortunately this protocol is heavily patented...
PIC and AVR microcontrollers are indeed the most well known and most used ones in the Embedded Systems world.
I don't know the extent of your knowledge in this area but for a beginner you may want to use something a bit easier. I have no experience with the PIC's but the AVR microcontroller's...