|
Member 7820220 wrote: Electronic Gadgets
Sorry I am not seeing the connection between you wanting to create electronic gadgets and this being a programming site....
[Edit]
Check out
www.ghielectronics.com[^]
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
modified 23-Aug-12 9:55am.
|
|
|
|
|
Any 'gadget' that is advanced enough that you can program on it will be using embedded C (possibly C++), not C#.
|
|
|
|
|
BobJanova wrote: embedded C (possibly C++), not C#.
Not necessarily true. GHIElectronics, www.ghielectronics.com, manufactures a microprocessor that uses the .NET compact framework and you can program them in C# or VB.NET. WPF if you use a touchscreen.
[Edit]
Granted anything that he does professionally with probbably be C.... but for a hobby project GHI might be just the thing he is looking for.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Hm, interesting. I thought that chips wanted to keep the environment down as much as possible, and even the Compact Framework is a lot bigger than a C-capable device.
|
|
|
|
|
BobJanova wrote: environment down as much as possible
That is true. But it's a very cheap way for a hobbyist to get into that arena. Which is the market I think that they go after. I know that the processors that we used in my previous life were cheap and all that but oh my lord how they raped you on the price for the programming tools and the interface.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
And countered.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
You've posted your message to C# Forum then ask us "not C#".
Maybe C/C++ forum was more helpful.
Meysam
|
|
|
|
|
|
Fifty years ago I wanted to learn how to make electronic gadgets, too. So I read books - from the library, at first - and I mail ordered parts from the back pages of electronics hobby magazines. I used those parts to build the neat things I found in the magazines. Then I went to school and learned all the math and science I could, so that I could one day understand all that I'd read. After a long, long time I was an electronics engineer, and designed and built with my own hands all sorts of cool electronic gadgets. You can do the same thing, though it's harder now. Everything is digital, and you don't learn anything about electronics doing that trivial stuff. But you can still have fun connecting devices together like kids' blocks and making them do stuff. Although you won't learn much about electronics, for sheer fun I'd suggest that you check out Lego MindStorm kits. These let you build your own robots and program them, which would probably fit better with what you really want to do. Have fun with it!
Will Rogers never met me.
|
|
|
|
|
Just a thought but the Forrest M Mimms III books are a good starting point not too expensive and not too Maths intensive, plus you get to make some really novel things, that more or less how I started
|
|
|
|
|
|
Yes, they don't really go out date, if you do an Amazon search on Getting Started With Electronics it should turn it up (very basic guide) and or The Electronics Pathway by Strickland & Lewis (more formal, structured, serious text book)
Glenn
|
|
|
|
|
Hi,
I don't know anything regarding Modbus in c#.I need some example of Modbus of Client/server to understand about Modbus.plzz Help me.
|
|
|
|
|
|
I don't understand this open aorta. I need a youtube-video showing me how to sow the sucker up. Plzz, help me.
I know it's rude, but it's pissing me off. I'll be taking a break from the CodeProject until I have learnt to ignore these kinds of posts.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: I'll be taking a break
Good luck with that. Perhaps we need a Dealing With urgentz codez Support Group.... Come back when you feel better.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
I'm assuming it's urgent?!
|
|
|
|
|
SMACK
there that should make you feel better
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Be happy that you don't know anything about it! It's old , a pain and a mess to work with.
My tip is: Ignore it and find better bus system to work with. Preferred a object oriented instead of register based.
|
|
|
|
|
Did you know that Code Project has a whole series of articles on a wide variety of topics? Funnily enough, someone already wrote an article about Modbus - you can find it here[^].
|
|
|
|
|
I'm not sure what I've gone wrong. It works ok in same namespace but not in different namespace. I use the dll calling to pass the enum value.
The compiler spat out 2 errors:
Error 1: The best overloaded method match for 'junkie.NewClass1.TestMethod(junkie.Output_State)' has some invalid arguments
Error 2: Argument 1: cannot convert from 'junk.Output_State' to 'junkie.Output_State'
sample code that I've written:
using junkie;
namespace junk
{
public enum Output_State
{
OFF,
ON,
Dont_Care,
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void button1_Click(object sender, EventArgs e)
{
ClassTwo testClassTwo = new ClassTwo();
testClassTwo.TestMethod(Output_State.Dont_Care);
}
}
public class ClassTwo
{
junkie.NewClass1 testClassThree = new junkie.NewClass1();
public void TestMethod(Output_State output)
{
testClassThree.TestMethod(output);
}
}
}
in a new class file:
namespace junkie
{
public enum Output_State
{
OFF,
ON,
Dont_Care,
}
class NewClass1
{
public void TestMethod(Output_State output)
{
switch (output)
{
case Output_State.ON: MessageBox.Show("ON"); break;
case Output_State.OFF: MessageBox.Show("OFF"); break;
case Output_State.Dont_Care: MessageBox.Show("Don't Care"); break;
default: MessageBox.Show("HUH?"); break;
}
}
}
}
|
|
|
|
|
The reason you are having a problem is because these aren't the same enums. By that, I mean that you have actually declared two enums here - the fact that they have the same names means nothing. What you need to do is drop the enum from the junkie namespace, and then add a simple using junk; statement to junkie. It will look like this:
namespace junkie
{
using junk;
public class NewClass1
{
public void TestMethod(Output_State output)
{
}
}
} The using statement means that the junk.Output_State enumeration is used.
|
|
|
|
|
that what you suggested is good... but I think I would use the better way is to drop the enum in 'junk' namespace and reads as follows (no change in 2nd class file):
using junkie;
namespace junk
{
public partial class Form1 : Form
{
SerialPort _port;
public Form1()
{
InitializeComponent();
}
public void button1_Click(object sender, EventArgs e)
{
ClassTwo testClassTwo = new ClassTwo();
testClassTwo.TestMethod(junkie.Output_State.Dont_Care);
}
}
public class ClassTwo
{
junkie.NewClass1 testClassThree = new junkie.NewClass1();
public void TestMethod(junkie.Output_State output)
{
testClassThree.TestMethod(output);
}
}
}
<pre>
Thanks for a big help... I've learned something new.
modified 23-Aug-12 8:59am.
|
|
|
|
|
junk.Output_State and junkie.Output_State are two different types, even though they appear identical in all other respects.
|
|
|
|
|
If these enums are not going to change over time and they are similar, I suggest you to have it in a common namespace and access it in both places.
like,
namespace Common
{
public enum Output_State
{
OFF,
ON,
Dont_Care,
}
}
namespace junk
{
using junkie;
using Common;
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void button1_Click(object sender, EventArgs e)
{
ClassTwo testClassTwo = new ClassTwo();
testClassTwo.TestMethod(Output_State.Dont_Care);
}
}
public class ClassTwo
{
junkie.NewClass1 testClassThree = new junkie.NewClass1();
public void TestMethod(Output_State output)
{
testClassThree.TestMethod(output);
}
}
}
namespace junkie
{
using Common;
class NewClass1
{
public void TestMethod(Output_State output)
{
switch (output)
{
case Output_State.ON: MessageBox.Show("ON"); break;
case Output_State.OFF: MessageBox.Show("OFF"); break;
case Output_State.Dont_Care: MessageBox.Show("Don't Care"); break;
default: MessageBox.Show("HUH?"); break;
}
}
}
}
|
|
|
|