Go to advanced search

by rin67630
Mon Jul 06, 2020 4:09 pm
Forum: C/C++
Topic: Trying to run UDP message, compiles OK, but does not work.
Replies: 8
Views: 361

Re: Trying to run UDP message, compiles OK, but does not work.

Why are you trying to build code designed for a totally incompatible platform (Arduino) on a Pi ? Start from here instead : https://www.geeksforgeeks.org/udp-server-client-implementation-c/ PeterO I come from the Arduino world. I have seen that the Arduino IDE provides a toolchain to compile for th...
by rin67630
Mon Jul 06, 2020 2:11 pm
Forum: C/C++
Topic: Trying to run UDP message, compiles OK, but does not work.
Replies: 8
Views: 361

Re: Trying to run UDP message, compiles OK, but does not work.

Been there, done that. I did not expect it to work and it did not. The WiFi adapter is managed by Linux and not accessible. The network connection in the c++ application must come from the OS, not from the hardware. The libraries are just not applicable. One probably need something like: #include <s...
by rin67630
Mon Jul 06, 2020 1:20 pm
Forum: C/C++
Topic: Trying to run UDP message, compiles OK, but does not work.
Replies: 8
Views: 361

Re: Trying to run UDP message, compiles OK, but does not work.

That is very confusing.

As a routine running inside Raspbian, there is no need to open an internet connection, and there is no dedicated hardware device for it.
The code should take the existing internet connection of Raspian.

I suspect that the given example is just not applicable...
by rin67630
Mon Jul 06, 2020 11:39 am
Forum: C/C++
Topic: Trying to run UDP message, compiles OK, but does not work.
Replies: 8
Views: 361

Trying to run UDP message, compiles OK, but does not work.

Hi, I am trying to compile an UDP message receiver using the Arduino IDE with the Raspberry toolchain. (I am just accustomed to it). #include <SPI.h> // needed for Arduino versions later than 0018 #include <Ethernet.h> #include <EthernetUdp.h> // UDP library from: bjoern@cs.stanford.edu 12/30/2008 /...
by rin67630
Thu Jun 04, 2020 4:30 pm
Forum: Networking and servers
Topic: most power saving way of maintaining a 2G-GPRS network connection?
Replies: 2
Views: 239

Re: most power saving way of maintaining a 2G-GPRS network connection?

Because 2G and 3G networks will soon be exchanged by 4G networks ... Thank you for the warning. I was not aware of that. Anyhow, according to my research today, the 2G technology will stay available in Germany as a fall-back infrastructure. There are just too many life-relevant devices (e.g. lifts ...
by rin67630
Sat May 30, 2020 8:54 am
Forum: Networking and servers
Topic: most power saving way of maintaining a 2G-GPRS network connection?
Replies: 2
Views: 239

most power saving way of maintaining a 2G-GPRS network connection?

Hi experts here, I am looking for the most power saving way to run a raspberry PI Zero with a GPRS connection (off grid). Sleep is not an option. I need to transmit real time a tiny message every second and every hour about 10K of info. The traditional USB dongles are not an option: they are massive...
by rin67630
Sun May 24, 2020 2:36 pm
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

scruss wrote:
Sun May 24, 2020 1:56 pm
Github's PDF downloading is annoying.
I had to experience that as well.
I got it finally downloading over the download button instead of downloading the file from the browser.
My apologies to disleixa for the misunderstanding.
by rin67630
Sun May 24, 2020 9:55 am
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

dsyleixa123 wrote:
Sun May 24, 2020 9:45 am
it's a link to a github folder where you can download the pdf
Please verify: your file in Github is actually not a pdf.

Code: Select all

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
  <link rel="dns-prefetch" href="https://github.githubassets.com">
  ...
  
by rin67630
Sun May 24, 2020 9:54 am
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

Some how, outside Arduino, the C/C++ communities never organized themselves into a coherent ecosystem like that. The problem is that they are with their new language building a new island, introduce new conventions, new stuff to learn and cut themselves from all available c++ stuff. The power of a ...
by rin67630
Sun May 24, 2020 9:37 am
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

Nonetheless, feel free to have a look at it. But it's just in German, admittedly. https://github.com/dsyleixa/RaspberryPi/tree/master/sources Thank you. I am cosy in German too. It looks like it could have been a very good start. I will take some time to read it. But why has your HTML document got ...
by rin67630
Sun May 24, 2020 9:18 am
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

$ cc hello.c && a.out Hello world! (for Arduinos, it's just pinMode(pinnumber,...) digitalRead(pinnumber) digitalWrite (pinnumber,...) What a condescending view do you have on Arduino programmers! Many of us have gathered years of experience with programming microcontrollers and are familiar with a...
by rin67630
Sun May 24, 2020 7:50 am
Forum: C/C++
Topic: How can I send raw data (bits or Bytes) to USB?
Replies: 8
Views: 696

Re: usb

rckanta wrote:
Sat May 23, 2020 6:00 am
D+ is a USB data output.
D- is a USB data input.
No. D+ and D- are a differential pair.
by rin67630
Sun May 24, 2020 5:25 am
Forum: C/C++
Topic: How can I send raw data (bits or Bytes) to USB?
Replies: 8
Views: 696

Re: usb

Heater wrote:
Sat May 23, 2020 7:43 am
You cannot wiggle the data lines of USB like that. They are not GPIO pins. They a driven by a hardware USB circuit.
...and it requires an extremely stringent timing, usually requiring an own quartz to get it accurate enough.
by rin67630
Sun May 24, 2020 5:10 am
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

And if there are 50 programs all using the same library, only one copy of that library is resident in memory. I think, from distant memory, that .a is short for archive. See "man ar" for details of the archive command which can create and modify static libraries (or any other collection of data). A...
by rin67630
Sun May 24, 2020 4:53 am
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

I hope recent compiled languages like Rust use just the same mechanisms (.so) on Linux and UNIX. IMHO it would have been easier to get rid of all the unnecessary complexity inside a better c++ IDE. Escaping to a brand new language brings other problems: you just lack all the existing ecosystem of l...
by rin67630
Sun May 24, 2020 4:43 am
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

That nicely sums up the sad state of affairs when it comes to programming in C/C++ in 2020. Still using tools and techniques from half a century ago. It's as an anachronism. As if car drivers today were still expected to know how to rebuild their motors and brakes before venturing onto the road. It...
by rin67630
Sat May 23, 2020 9:50 pm
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

If your programs are not huge, just one or a few C source files, I would not bother with make and make files. You can just compile a single C source with ... and run it to build your code: $ ./build.sh Thank you, that is clearly explained! But where am I supposed to store the common libraries, sinc...
by rin67630
Sat May 23, 2020 8:58 pm
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

IMO the MagPi C tutorial might be a good start (for download) https://magpi.raspberrypi.org/articles/learn-code-c http://magpi.cc/learn-c-book Thank you, .. but not really. Experienced Arduino user know the primitives of C++ and 95% of what this book teaches.. What they lack is the procedure to fin...
by rin67630
Sat May 23, 2020 8:32 pm
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

rin67630 this is the conversion of the INA266 code to linux driver attached let me know if you have any troubles with it https://github.com/LdB-ECM/Exchange/tree/master/Arduino-INA226 I just shimmed the Arduino calls onto the linux I2C driver Thank you, I really appreciate your help. The INA226 was...
by rin67630
Sat May 23, 2020 7:51 pm
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

Arduino users don't patch or re-program libs, they just use them just the way they are. They don't even need to care about the lib source code and so they are supposed to actually never read them at all. All they do is read example codes how to use the lib in proprietary Sketches, and they use them...
by rin67630
Sat May 23, 2020 2:28 pm
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

..The Arduino guys did a great job. They did not invent everything. They took over almost verbatim the concept from Processing, which is available for the Pi as well. But Processing is Java and kept serving mostly display stuff with very little efforts done on IoT requirements . If only some expert...
by rin67630
Sat May 23, 2020 2:08 pm
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

OK.
I see that the Italians did a really brilliant job to get programming in c++ really simple.
OK, it's a subset of all the stuff, but it had a tremendous success and has gathered more fans (including me) and made more things done, than anything else!
Respect!
by rin67630
Sat May 23, 2020 1:19 pm
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

jahboater wrote:
Sat May 23, 2020 1:03 pm
But for general I2C access then just adding -lpigpio should be enough.
Sorry but I have got no clue of what you mean:
adding -lpigpio to what?
by rin67630
Sat May 23, 2020 12:05 pm
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

Currently I'd like to use C++ to get my measurments to Thinger.io. The do only provide a C++ interface, no python. How do you mean just use a library? Let me take a concrete example: I have a breadboard containing an INA226 chip that interfaces over I2C. In the Arduino world, I just type "INA226" in...
by rin67630
Sat May 23, 2020 11:30 am
Forum: C/C++
Topic: Tutorial to start programming in c++ for Arduino transfugees.
Replies: 72
Views: 3158

Re: Tutorial to start programming in c++ for Arduino transfugees.

I already have the Pi as a device in the Arduino IDE.
But the problem is the lack of valid libraries to run on the Pi, or don't I just know how to manage them?

Go to advanced search