CheckEmoji Community · the emoji forum
🏠 Home 🆕 What's new ❓ Unanswered 🔥 Popular 📡 RSS Members 👥 0 online log in · register
Home › IT › Advanced Users › Programming › Raspberry Pi projects

Raspberry Pi projects

Started by Jason Carter2 · · 👁 6 views · 72 replies

📡 Subscribe to replies

Participants Jason Carter2Kyle Sanchez4Drew Gray50Linda Moralesrestlessdrifter692Harold Jones5placidrangercoastaldrifter6Ronald Barnes5jadefalcon4Sophia Moore52Jeffrey Anderson84swiftharbor4William Richardson12Terry Brown8Nicholas Doyle7Jesse Brown61David Adams5Nathan Moore6Nathan Morris3Chris Hall3Jeffrey Thomas802silverharbor60nimblegull23 …
Ronald Barnes5 Ronald Barnes5 Member
14 messages
joined Sep 2011
#21 ·
Well, what is this? You simply cannot get it running. There is no way to make it work, regardless of how you wire it up. 😢
I also have this driver, though I am unsure how to interface it with an Arduino http://www.recantha.co.uk/blog/wp-co...63545f6aad.jpg
Ronald Barnes5 Ronald Barnes5 Member
14 messages
joined Sep 2011
#22 ·
Is anyone there?
placidranger placidranger Regular
339 messages
joined Sep 2004
#23 ·
edit:
Actually, this isn't the exact same shield we discussed on the previous page.

http://www.geeetech.com/wiki/index.p...rd_for_Arduino
It uses the same ULN2003 chip—just with a slightly different pin layout—but the schematic remains identical.

Helpful enough?
Ronald Barnes5 Ronald Barnes5 Member
14 messages
joined Sep 2011
#24 ·
Much appreciated, this worked perfectly for me 🙂))
Thanks
Ronald Barnes5 Ronald Barnes5 Member
14 messages
joined Sep 2011
#25 ·
Back again. 🙂
I am looking for someone to write a program identical to this one http://www.geeetech.com/wiki/index.p...rd_for_Arduino. However, I need the motor to rotate exactly 180 degrees rather than spinning continuously as shown in the example on that page
. Thanks in advance. 🙂
Ronald Barnes5 Ronald Barnes5 Member
14 messages
joined Sep 2011
#26 ·
Back again. 🙂
I am looking for someone to write a program identical to this one: http://www.geeetech.com/wiki/index.p...rd_for_Arduino however, I need it modified so the motor rotates exactly 180 degrees instead of spinning continuously as shown in the example on that page.
Thanks in advance. 🙂
placidranger placidranger Regular
339 messages
joined Sep 2004
#27 ·
Fire up the Arduino IDE, head over to Examples, and pull up the Stepper library; just sit there and study the code. You can find a massive amount of tutorials out there specifically on how to manage steppers.
Ronald Barnes5 Ronald Barnes5 Member
14 messages
joined Sep 2011
#28 ·
/*
* MotorKnob
*
* A stepper motor follows the turns of a potentiometer
* (or other sensor) on analog input 0.
*
* http://www.arduino.cc/en/Reference/Stepper
* This example code is in the public domain.
*/

#include

// Adjust this based on your specific motor's step count
#define STEPS 100

// Initialize the stepper class by defining
// the step count and the specific pins used for
// the connection
Stepper stepper(STEPS, 8, 9, 10, 11);

// Stores the last recorded analog input value
int previous = 0;

void setup()
{
// Set the motor rotation speed to 30 RPM
stepper.setSpeed(30);
}

void loop()
{
// Read the current sensor value
int val = analogRead(0);

// Move the motor a distance proportional to the
// change in the sensor data
stepper.step(val - previous);

// Update the previous value for the next iteration
previous = val;
}

If my interpretation is correct, then 😢
Pardon the persistence, but I am simply intent on learning.
placidranger placidranger Regular
339 messages
joined Sep 2004
#29 ·
This code assumes you've got a potentiometer hooked up to analog 0. It pulls the current reading into a variable called val. If the value shifts from the last reading, it triggers the motor for a set number of units.

The logic expects the Stepper pins to be wired to 8, 9, 10, and 11. You’ll need to either rewire your setup to match the code or just update the code to match your wiring—your choice.

Once that's sorted, go ahead and mess around with the STEP values and try adjusting the "setSpeed (30)" call. It's the best way to actually wrap your head around how the thing behaves.
jadefalcon4 jadefalcon4 Newcomer
4 messages
joined May 2014
#30 ·
Hey everyone... I’ve been deep in the weeds with this Arduino project of mine lately... I managed to pick up a Bluetooth HC-05 module because I was hoping to establish a seamless wireless connection with my PC... Now, here is the kicker: I can actually get the connection established, but the moment I fire up the specific port on the terminal, everything just goes dead—I can't send a single byte, let alone receive anything back. Honestly, I’ve been banging my head against this wall for weeks now. Has anyone else here wrestled with this particular headache, and if so, does anyone have any actual advice to offer?
placidranger placidranger Regular
339 messages
joined Sep 2004
#31 ·
http://www.instructables.com/id/Ardu...ecting-easily/
Is this what you're after?

The module seems to work right out of the box—no fuss there. Just drop a comment below. What exactly is the program supposed to be doing?
jadefalcon4 jadefalcon4 Newcomer
4 messages
joined May 2014
#32 ·
placidranger said:http://www.instructables.com/id/Ardu...ecting-easily/
?

It appears the module is ready to go right out of the box, so why don't you just drop by the lab? I'm curious, what exactly is the code supposed to be doing?

Well, I followed that exact tutorial to the letter... and it simply refuses to cooperate. To be clear, the connection is established, but once I open the port in the terminal, nothing happens—no initial startup message, no way to send commands, absolutely nothing. It’s only when I wire the Bluetooth HC-05 Rx to pin 10 and the Tx to pin 11 that the system finally spits out that message saying the Bluetooth is active, but even then, everything grinds to a halt again; I can't send any data, which naturally means I can't even toggle an LED on or off.🙂

I'm working with this specific module:
http://www.dx.com/p/hc-05-wireless-b...1#.U2EXlvmSxBk
placidranger placidranger Regular
339 messages
joined Sep 2004
#33 ·
Maybe post the code you're uploading to the Arduino—there might be an issue buried in there somewhere.
jadefalcon4 jadefalcon4 Newcomer
4 messages
joined May 2014
#34 ·
placidranger said:Try uploading the specific code you're using to the Arduino, because honestly, there might be a glitch right there in the script itself.

To get things moving, I just grabbed this snippet from an online tutorial...
Code:
// This program shown how to control arduino from PC Via Bluetooth
// Connect ...
// arduino>>bluetooth
// D11 >>> Rx
// D10 >>> Tx
//Written By Mohannad Rawashdeh
//for http://www.microsoft.com/

// you will need arduino 1.0.1 or higher to run this sketch

#include <SoftwareSerial.h>// import the serial library

SoftwareSerial Microsoft(10, 11); // RX, TX
int ledpin=13; // led on D13 will show blink on /off
int BluetoothData; // the data given from Computer

void setup() {
// put your setup code here, to run once:
Microsoft.begin(9600);
Microsoft.println("Bluetooth On please press 1 or 0 blink LED ..");
pinMode(ledpin,OUTPUT);
}

void loop() {
// put your main code here, to run repeatedly:
if (Microsoft.available()){
BluetoothData=Microsoft.read();
if(BluetoothData=='1'){ // if number 1 pressed ....
digitalWrite(ledpin,1);
Microsoft.println("LED On D13 ON ! ");
}
if (BluetoothData=='0'){// if number 0 pressed ....
digitalWrite(ledpin,0);
Microsoft.println("LED On D13 Off ! ");
}
}
delay(100);// prepare for next data ...
}

Against all odds, it actually started working😁, thanks for the help
placidranger placidranger Regular
339 messages
joined Sep 2004
#35 ·
So, Bill Gates sends out this message: "Wi-Fi on please press 1 or 0 .."?
And then nothing happens when you actually hit '1' or '0'?

Do you have any baud rate settings adjusted in your terminal program? It’s set to 9600 on the Bill Gates side—that should match the terminal too, assuming you haven't missed some other minor setting somewhere.
placidranger placidranger Regular
339 messages
joined Sep 2004
#36 ·
Give this code a shot:
Code:
void loop() {
if (Genotronex.available()){
BluetoothData=Genotronex.read();
Genotronex.println(BluetoothData);
}
delay(100);// prepare for next data ...
}

Update:
I see you updated the post—glad to hear it finally worked. Cheers, 👍
Sophia Moore52 Sophia Moore52 Active Member
95 messages
joined Oct 2016
#37 ·
Has anyone ever ordered something like this before...

Check out this 16-in-1 smart tool kit on DX... looks like a pretty solid value for any DIY project...

I'm having a bit of trouble putting this section together...

Check out this impressive display platform... quite the centerpiece for any collection...

It seems like I’m dealing with two screws and a plastic tab that needs to slot into a hole on the metal bracket. It’s a bit of a puzzle... if I get the screws in first, the plastic won't line up, but if I try to seat the plastic part first, I can only manage to catch one screw...
Jeffrey Anderson84 Jeffrey Anderson84 Newcomer
1 message
joined May 2014
#38 ·
Hey there! So, I’ve been messing around with Arduino for a few months now, and honestly, I’m actually making some decent headway—at least when it comes to the simpler projects. 🤷🤷🤷
But here’s where I’m hitting a bit of a wall: I really want to figure out how to run two or more different programs at the exact same time. For example, I’d love to have one part of the code handling commands from a Bluetooth device while another part handles input from a keyboard simultaneously. Does anyone know the trick to merging these functions so they run concurrently? I’d really appreciate any insight you could share!
placidranger placidranger Regular
339 messages
joined Sep 2004
#39 ·
Jeffrey Anderson84 said:Hey there... I've been messing around with Arduino for a few months now and I'm getting the hang of it—at least with the basic stuff. But here's the snag: I want to run two or more different programs at once, and I'm stuck. For example, I want one part to handle Bluetooth commands from a device while another part handles inputs from a keyboard. If anyone knows how to merge these so they run simultaneously, I'd appreciate the help... 🤷🤷 🤷

The loop function runs continuously—that's just how it works. Just drop both the Bluetooth logic and the keyboard polling inside that loop, one after the other. Alternatively, you could set up the keyboard using interrupts (check this out: http://www.arduino.cc/en/Reference/AttachInterrupt). It's much cleaner.
swiftharbor4 swiftharbor4 Newcomer
1 message
joined Apr 2015
#40 ·
Hey everyone, hope someone out there can help me out... I'm trying to wrap my head around how to actually explain this function or procedure

void sviraj(long trajanje,int frekvencija){
trajanje *=1000;
int period=(1.0 / frekvencija)*1000000;
long proteklovrijeme= 0;
while(proteklovrijeme < trajanje){
digitalWrite(alarm,HIGH);
delayMicroseconds(period/2);
digitalWrite(alarm,LOW);
delayMicroseconds(period/2);
proteklovrijeme +=(period);

thanks in advance 🙂

You must log in or register to reply here.

Log in Register

🔗 Similar threads