Recent Posts

Pages: [1] 2 3 ... 10
1
The duty cycle defines how long the pin is HIGH. Each HIGH causes the stepper to step once. If a value of 128 12,5% of 4096) causes a step when the timer is triggered every 134600 microseconds, then it will certainly cause a step when the timer is triggered every 224400 microseconds.

The longer interval between triggers, with the same duty cycle, will result in the PIN being HIGH for a longer interval.

Whether that is a problem, or not, can only be determined experimentally.

Going the other way, triggering the timer more often, would be more of a concern to me, where possibly the shorter HIGH time might not be long enough to trigger a step.
2
Normal people make their requirements based on what they want to do, not what they want to use ;)

But if you changed compilers and messed with opcodes, that almost certainly means you're stuck with the processor you did that for and the language that compiler is made for...
3
Programming Questions / Re: Using funtions
Last post by javosegurag - Today at 03:40 pm
Posted by groundFungus  - Jun 19, 2018, 10:52 pm Quote
Do you have a pull down resistor from pin 11 to ground?

That was the problem. Now it is working fine.
4
Editor / Re: Compilation failed. Please...
Last post by endorama - Today at 03:39 pm
@steve933 you should be good to go now. Let me know.

@TMX I'm looking into it!
5
Look at your code.  When it is Auto Formatted in the IDE the last closing brace should be on the left margin.  Where is it in your code ?

You still have one too may opening braces or one too few closing braces in several places.

Look where the SelectButton() function ends.  Is the closing brace on the left margin ?  Look carefully at your other functions too.  Do they end with a closing brace on the left margin ?
6
Hardware / Re: Pilotare 4 motori cw/ccw
Last post by -zef- - Today at 03:38 pm
una volta che ne colleghi uno come ad esempio in questo link dove viene usato proprio un motorino come il tuo ripeti le stesse cose utilizzando altri tre mosfet e altri tre pin pwm di arduino e sei a posto.
7
Audio / Re: Getting sound level from a...
Last post by Stabbler - Today at 03:37 pm
Not without you posting a good picture of your wiring.
That is a rectifier diode and while it will work the response is not so fast, so try a small signal diode like a 1N4148.

Also with a diode your audio signal needs to be above 0.7V for the diode to conduct.
Thank you Mike.

I understand it is dificult to give an answer without a picture of the wiring. (It is also hard to produce a clear picture of the wiring.)

I will probably drive to the store to get the 1N4148. And see if that works. If it fails I will take another attempt at making a clear picture.

Does the signal also has to be above 0.7V for the 1N4148?
8
Ah sorry about the emoticons, I'll stop with them.

@septillion I have such specific requirements because it's a project I've been really thinking about for a long time now, I actually had even more specific requirements but lightened up on them when I posted here. For example I did modify a compiler locally on my computer to produce a custom opcode range with features added and others removed specifically tailored for my alarm clock that I was going to look into possibly ordering one day in the future from a manufacture. The custom processor with custom opcodes was more realistically based on an existing processor, just very stripped down, and after studying how other companies order custom processors that strip them down or add new features.

Also I did plan to have actual cartridges instead of an SDCard but I was trying to lighten up the requirements before posting on here (Details below)

I am very competent in C++, it was my 2nd programming language I learned and one one that I chose to really move to advance level before eventually deciding to move to other languages

@PaulRB I'm sorry, this is my first project so perhaps I should have gone a different route for it, in software I'm used to planning everything out in detail before implementing it but hardware I suppose is completely different then.

I find the old cartridge stuff from before I was born so absolutely fascinating for the different gaming devices, the idea that the console, whatever it is, would run some initial boot stuff and then transfer control over to a cartridge. I would love that in a simple alarm clock, the idea that you can just load an "Alarm Clock" ROM onto an sdcard to simulate a cartridge and insert it into an alarm clock to run it but in reality it would just be a generic device with an old retro LCD and simple buzzer sound but the freedom to make an "Alarm Clock" however you want in a device with such capability or even to make something completely different from an alarm clock absolutely intrigues me.

I never knew about not being able to run code off the SDCard, I knew that people designed custom cartridges for existing gaming systems both old and new such as the DSI that has an SDCard adaptation cartridge which code runs off of but perhaps I'm misunderstanding this for the Arduino.

@ChrisTenone I am very interested in older hardware before I was born so I guess I kind of live in that world a bit too much. Also is ROM not the same as EEPROM or is EEPROM easier to alter than older ROM styles. That would make sense though for modern computers I would imagine.

So your suggestion would be to pick a random Arduino board and just have fun and learn hardware getting used to the waters first doing random examples or tinkering in code before jumping in to a more complex project.

Thank you for everyones help so far
9
LEDs and Multiplexing / Re: Speeding up simple code
Last post by lesept - Today at 03:35 pm
pulseIn has a default timeout of 1 second, but you can change it easily :
Code: [Select]
pulseIn(pin, value, timeout)
timeout (optional): the number of microseconds to wait for the pulse to start; default is one second (unsigned long)
I beleive that using a timeout of up to 25000 µs should work (but this depends on what is plugged to the input pins) (it's a wild guess)
10
Programming Questions / Re: Relay Control Problems
Last post by UKHeliBob - Today at 03:33 pm
Code: [Select]
        currentState = stoprobot;      //Nächste Bewegung - Bewege zu...

After stopping the robot what do you want it to do ?  I assume that it should move forward as you are calling the forward() function so the next state should be FORWARD.
Pages: [1] 2 3 ... 10