Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!
Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.
Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!
hi everyone, I'm a newbie with Arduino and in desperate need for help! I study industrial design and am working on a project where I want to have a little engine with a counterweight (like you find in electric toothbrushes, vibrators...) be controlled by the signals read by this ecg module: https://how2electronics.com/ecg-monitoring-with-ad8232-ecg-sensor-arduino/
both of those setups work fine for themselves, and since I had the manual and all the information it was easy even for me to get everything running. But since my knowledge doesn't go any further than that, I am a bit lost now. How do I have to connect the hardware, and how do I re-write the code to get it to work? I've been copy-pasting the codes on the websites posted above.
Hopefully this post describes well enough what I'm trying to do. I'd be happy to answer any more questions or show some pics of what I've got so far. Any help would be greatly appreciated!
Unfortunately, I have no experience with either. Looking at both projects though, I do not see a conflict in wiring - well, except for the potentiometer. You can leave that one out since you're using the ECG data instead.
Combining code (without modifying anything - and both functions work as before) should not be a problem either.
This could look something like this, where I presume you'd want the ECG data to be used as an input for the motor.
#define PWM 3
int pot;
int out;
void setup() {
// initialize the serial communication:
Serial.begin(9600);
pinMode(10, INPUT); // Setup for leads off detection LO +
pinMode(11, INPUT); // Setup for leads off detection LO -
pinMode(PWM,OUTPUT);
}
void loop() {
pot=analogRead(A0);
if((digitalRead(10) == 1)||(digitalRead(11) == 1)){
Serial.println('!');
} else{
// send the value of analog input 0:
Serial.println(pot);
}
out=map(pot,0,1023,0,255);
analogWrite(PWM,out);
delay(1); // may longer be needed
}
Â
Note: I do not have any of these components and I have zero experience with these either. So the code is untested. But I'm confident this will get you close to what you may have had in mind. 😊Â
MySolutions.Tech Best DVD/Blu-ray/Video Solutions-Help You to Digitize Your Colorful Life
AlternativeTo Great resource when you're looking for alternatives for an application that you'd like to use, but might not be available on your platform or the application you have is just not doing it right.
OpenElec The ultimate XBMC distribution. No operating system required, comes completely in a compact form with Embedded Linux, for Intel, AMD, AppleTV, Raspberry Pi, etc.
Ubuntu Ubuntu is probably one of the most used Linux distro's out there. Very well supported and a great Linux distro
CleverSubmitter Submits your website for indexing with a truckload of search engines.
TinyMediaManager Small, but slick little application to manage your movies and movies meta-data (Windows, MacOS X and Linux!).
Links Page These and more of our favorite links can be found on the Links Page.
New Downloads
RenameMyTVSeries-2.3.10-QT5-Linux-x64-static-ffmpeg.tar.xzDate: 2025-08-23 - Size: 78.3 MBRename My TV Series, for Linux (64 bit QT5), a tool to assist in renaming TV Show episode files. This bundle comews with rather large static builds of ffmpeg and ffprobe.
RenameMyTVSeries-2.3.10-QT5-Linux-x64-shared-ffmpeg.tar.xzDate: 2025-08-23 - Size: 1.9 MBRename My TV Series, for Linux (64 bit QT5), a tool to assist in renaming TV Show episode files. This bundle relies on ffmpeg and ffprobe shared libraries on your system.
RenameMyTVSeries-2.3.10-GTK-Linux-x64-static-ffmpeg.tar.xzDate: 2025-08-23 - Size: 78.3 MBRename My TV Series, for Linux (64 bit GTK), a tool to assist in renaming TV Show episode files. This bundle comes with (large) static builds of ffmpeg and ffprobe.
RenameMyTVSeries-2.3.9-macOS-Universal.dmgDate: 2025-08-22 - Size: 100.5 MBRename My TV Series, for macOS (Universal binary for Apple Silicon ARM and Intel 64 bit), a tool to assist in renaming TV Show episode files. Static universal binary builds of ffmpeg and ffprobe are included.
RenameMyTVSeries-2.3.10-GTK-Linux-x64-shared-ffmpeg.tar.xzDate: 2025-08-22 - Size: 1.9 MBRename My TV Series, for Linux (64 bit GTK), a tool to assist in renaming TV Show episode files. This bundle relies on ffmpeg and ffprobe shared libraries on your system.
RenameMyTVSeries-2.3.9-Windows-x64-setup.exeDate: 2025-08-22 - Size: 49.1 MBRename My TV Series, for Windows (Intel 64 bit), a tool to assist in renaming TV Show episode files. Static builds of ffmpeg and ffprobe are included.
Downloads Page Find these and more Downloads on the Downloads Page, where you will also find articles references, operating system requirements and categories.
Amazon Ads
Support us by doing your shopping at Amazon.com, either click the link, or click one of the links below …
You can also sponsor us through these Amazon offerings:
Please consider disabling your ad blocker for our website.We rely on these ads to be able to run our website.You can of course support us in other ways (see Support Us on the left).