Recent Posts

Pages: [1] 2 3 ... 10
1
Programming Questions / Re: Servo to Motor
Last post by lastchancename - Today at 05:55 am
I have no idea what you're asking.
Perhaps someone else can come up with suggestions.
I realisethat you're learning, but you need to break down the code you already have and understand what it does.
Simply putting 'some' new code 'somewhere' will rarely work.

it's all tightly linked together.
2
ESP8266 = 1 A/I pin and ... 9 GPIO ?

NANO 8 A/I pins,  12 GPIO ?

ESP8266= 3.3 V

UNO/NANO = 5 v

although they can do many of the same things, neither is a replacement for all the functions of the other.

lots of help on google      esp8266 to UNO serial   
got over 1million hits

https://medium.com/@cgrant/using-the-esp8266-wifi-module-with-arduino-uno-publishing-to-thingspeak-99fc77122e82'

https://www.youtube.com/watch?v=BXbDAyR5cIU
3
Programming Questions / Re: Servo to Motor
Last post by bob5731 - Today at 05:38 am
now ware do I put this code at in my code?

Code: [Select]
void openVent()
{
 if (!bVentStatus)
 {
   // set to green once opened
   digitalWrite(OPEN_VENT_PIN, LOW);              
   delay(200);
   digitalWrite(OPEN_VENT_PIN, HIGH);
   bVentStatus = true;
   
// when vent is opened, send the room temperature data to Intel  IoT Analytics
 }
}

void closeVent()
{
 if (bVentStatus)
 {
   // set to red once closed
       digitalWrite(CLOSE_VENT_PIN, LOW);              
   delay(200);
   digitalWrite(CLOSE_VENT_PIN, HIGH);
   bVentStatus = false;
 }
}
4
I have some troubles to compilate the follow code, why?
If you have programmed in JAVA anytime, you know that this kind of code is possible to operate in JAVA, why is not possible in Arduino IDE?
I'm not a java programmer (barely an object oriented programmer) but reasonably confident that an array on itself in java is an object; simply because it has associated members like length. In C++ it is not an object.

So as indicated in the first reply, this is C++, not java.
5
It looks like you posted the photo of the sensor after I responded to the post. Looking at that photo, I am pretty confident of my explanation.

The magnetic cylinder is polarized in sectors, alternating N-S-N-S-... around the circle, and I think it is nearly impossible to get all the sector field strengths equal. So the apparent sizes, or arc lengths of the sectors vary, from the Hall sensor's point of view.

Thanks for the heads up! I've been looking at motors like that, for example from Banggood (which claims 11 PPR, by the way).
6
Programming Questions / Re: Servo to Motor
Last post by lastchancename - Today at 05:23 am
Depending on your motor, that should be fine for small hobby motors.
The example only shows on/off control, but does indicate what's needed for PWM speed control.

As a motor driver, that board controls the motor, but *you* have to decide when you're at a limit or other position that you want reach.(open, close) etc.

As a simple dc controller, *you* need to understand the input pin control requirements - which will develop your programming skills a bit more than a straight h-bridge.  Remember to use 'analog' output pins if you're going to try PWM speed control.
7
Displays / 3.95 TFT mucfriend Driver does...
Last post by AntorOfficial - Today at 05:18 am

graphictest_kbv:

Code: [Select]
Serial took 0ms to start
ID = 0x8080




LCD_ID_readreg:

Code: [Select]
reg(0x0000) 80 80 ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 80 FF FF FF Manufacturer ID
reg(0x0009) 80 80 80 80 80 Status Register
reg(0x000A) 88 88 Get Power Mode
reg(0x000C) E6 E6 Get Pixel Format
reg(0x0061) 80 80 RDID1 HX8347-G
reg(0x0062) 80 80 RDID2 HX8347-G
reg(0x0063) 80 80 RDID3 HX8347-G
reg(0x0064) 80 80 RDID1 HX8347-A
reg(0x0065) 80 80 RDID2 HX8347-A
reg(0x0066) 80 80 RDID3 HX8347-A
reg(0x0067) 80 80 RDID Himax HX8347-A
reg(0x0070) 80 80 Panel Himax HX8347-A
reg(0x00A1) 80 80 80 80 80 RD_DDB SSD1963
reg(0x00B0) 80 80 RGB Interface Signal Control
reg(0x00B4) 80 80 Inversion Control
reg(0x00B6) 80 80 80 80 80 Display Control
reg(0x00B7) 80 80 Entry Mode Set
reg(0x00BF) 80 80 80 80 80 80 ILI9481, HX8357-B
reg(0x00C0) 80 80 80 80 80 80 80 80 80 Panel Control
reg(0x00C8) 80 80 80 80 80 80 80 80 80 80 80 80 80 GAMMA
reg(0x00CC) 80 80 Panel Control
reg(0x00D0) 80 80 80 Power Control
reg(0x00D2) 80 80 80 80 80 NVM Read
reg(0x00D3) 80 80 80 80 ILI9341, ILI9488
reg(0x00D4) 80 80 80 80 Novatek ID
reg(0x00DA) 80 80 RDID1
reg(0x00DB) 80 80 RDID2
reg(0x00DC) 80 80 RDID3
reg(0x00E0) 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 GAMMA-P
reg(0x00E1) 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 GAMMA-N
reg(0x00EF) 80 80 80 80 80 80 ILI9327
reg(0x00F2) 80 80 80 80 80 80 80 80 80 80 80 80 Adjust Control 2
reg(0x00F6) 80 80 80 80 Interface Control


after wasting a lot of time... I could show something on display. See attachment.
8
Sensors / Re: Temperature Sensor with LC...
Last post by Wawa - Today at 05:15 am
Sensor in the Fritzing seems to be a LM35 or TMP36 temp sensor.
Leo..
9
Programming Questions / Re: Servo to Motor
Last post by bob5731 - Today at 05:13 am
http://qqtrading.com.my/dual-channel-motor-driver-module-hg7881

Basically I've got two alligator clips connected to the vent Miser then they go into motor signal a then I grab power and ground from Arduino. That was just a sample code I found on the internet. If that code is good enough to be used where do I put it in the code that I posted at the beginning of this thread. Like I said before I did not write the original code. I tried it with a servo and the problem I was running into was once I built a mount and put it on a standard air vent the hole in the wall would have to be severely modified to make it all fit.
10
That's an issue on another line.  If you want help understanding how a 2D array works then you've got it.  
i see - okay, it's a matter of still fully grasping pointers then.
(the Arduino Reference page on pointers is rather sparse, i'll have to look elsewhere to try and get it under my belt.)


...It looks like you tried to pass one of those int pointers directly to print,
yes, that was actually the whole code - i was just trying to keep it simple;
but print doesn't take a pointer to int as an argument.  
so i guess that's not possible.

You have to dereference the pointer when you pass it to print.  I can't show you what that looks like in your code because you aren't sharing your code.  
so code2send is now a pointer, and to dereference it i'd use a '&' right ?

is it possible to manipulate that so that i *can* println it ?

i tried
Code: [Select]
Serial.println(&code2send);

but now the error is;
" cannot convert 'int*' to 'int**' in initialization "

what i need, is to understand the initialization syntax properly;

what is the difference between;
int remoteALLNUM[6][78] = {400.... ..... .....
and;
int remoteALLNUM[] = {400.... ..... .....

the latter won't throw any error, but of course it's not giving the data that i expect.
Pages: [1] 2 3 ... 10