Sponsored Content
Top Forums Programming Arduino Project: iPhone to HM-10 BLE to NB-IoT Shield to NB-IoT Network to Internet to Linux Server Post 303043420 by wisecracker on Tuesday 28th of January 2020 11:21:18 AM
Old 01-28-2020
Hi Neo...
I was thinking about this type of event but as I don't have the HW and code then I couldn't comment for certain.
Just one thing though, ensure whichever I/O pin you decide to use, make absolutely sure that it is not used for the two external HW boards at all.

This bit is weapon of last resort, it is possible to use one of the unused analogue inputs as a _digital_ input for RX.
Difficult - YES, probably VERY difficult, but it all depends on the analogue sample speed.

I have done it on my ancient Arduino Diecimila board but speed was not important...


Bazza...
This User Gave Thanks to wisecracker For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Linux for an internet server to an ISP

I just moved away from a T3 line back to a dial up I just wanted to know would a P200 with 64meg and a 4 gig hard drive be ok for a linux server for an additional 3 pcs all running win98. I will be dialing into an isp using a 56k v90 modem. Any support or help will be great. (3 Replies)
Discussion started by: izrailov
3 Replies

2. IP Networking

can i force connecting to local web server via internet network ?

Hello all this is general question , if i have web server installed in my local pc and i have client that connecting to that web server can i force it always to go via the internet network ? the reason im asking is .. that im noticed when i close my internet connection i still can connect to my... (2 Replies)
Discussion started by: umen
2 Replies

3. IP Networking

Can not access Linux server over the Internet

hi i have linux server connected to internet through a switch/router. i have opened a port on the router and i am able to connect to the server if iptables is off. but when it is on i cant. i want to create a rule in iptables so that it accepts packets coming from a particular datacard. it... (7 Replies)
Discussion started by: u.n.i.x
7 Replies

4. Programming

Arduino-cli - Uploading to Unknown Chinese Arduino Boards using the Arduino Command Line Interface

In my further exploration of Arduino, today I decided to install the arduino-cli on my mac today. https://github.com/arduino/arduino-cli I followed the instructions for macOS but when I got to this part: arduino-cli board list I got the dreaded "Unknown" Fully Qualified Board Name... (1 Reply)
Discussion started by: Neo
1 Replies

5. Programming

Arduino Project with NB-IoT (3GPP) and LoRa / LoRaWAN

My favorite projects are always related to the "latest" tech in command and control, networking and network communications. This Elecrow GSM/GPRS/EDGE SIM5360E 3G Shield seems to be the "latest and the greatest" as far as 3G and GPS, as far as I can see so far, but I has it drawbacks for sure.... (6 Replies)
Discussion started by: Neo
6 Replies

6. Programming

NB-IoT Arduino Shield from AIS (Thailand) First Impressions

Today I received my NB-IoT Arduino Shield for AIS (Thailand). Here is a "pinout" photo of the shield. My shield looks just like the one above, for the most part. I'll post another photo of the actual device later. When I received the shield in the mail, I went immediately to a local... (8 Replies)
Discussion started by: Neo
8 Replies

7. Programming

Elecrow GSM/GPRS/EDGE SIM5360E 3G Shield for Arduino

Normally I have very good experiences buying from AliExpress, but in this case with Elecrow, I'm disappointed. After confirming with Elecrow on AliExpress that their Elecrow GSM/GPRS/EDGE SIM5360E 3G Shield for Arduino would work with 3G SIM cards in Thailand, I purchased one. My plan was to... (1 Reply)
Discussion started by: Neo
1 Replies

8. Programming

Basic Arduino UNO Bluetooth Testing with the BLE 4.0 (CC2541, MLT-BT04 IC)

Here is a sketch to do basic testing for the Arduino UNO and the MLT-BT04. This BLE module works with IOS (iPhone) and I'll add some details on my IOS testing with an iPhone in a follow-up post. For now, here is the basic BLE (HM-10) sketch for the Arduino UNO: /* Arduino test-code... (7 Replies)
Discussion started by: Neo
7 Replies

9. Programming

Wuhan Coronavirus Status App for China - Rapid Prototype using MQTT and the IoT OnOff IOS App

With a little bit of work, was able to build a nice "Wuhan Coronavirus Status" app using MQTT and the IoT-OnOff app. More on this technique here: ESP32 (ESP-WROOM-32) as an MQTT Client Subscribed to Linux Server Load Average Messages The result turned out nice, I think. I like the look and... (10 Replies)
Discussion started by: Neo
10 Replies

10. Hardware

Arduino Robot Tank Project

Normally I'm not into kits, but I thought my wife would enjoy this one since she is a big fan of robots and droids on StarWars! We are done with the basic mechanical assembly and starting on the electronics assembly today. The robot's "brain" consists of three levels. The Arduino board, on... (5 Replies)
Discussion started by: Neo
5 Replies
joy(3alleg4)							  Allegro manual						      joy(3alleg4)

NAME
joy - Global array of joystick state information. Allegro game programming library. SYNOPSIS
#include <allegro.h> extern JOYSTICK_INFO joy[n]; DESCRIPTION
Global array of joystick state information, which is updated by the poll_joystick() function. Only the first num_joysticks elements will contain meaningful information. The JOYSTICK_INFO structure is defined as: typedef struct JOYSTICK_INFO { int flags; - status flags for this joystick int num_sticks; - how many stick inputs? int num_buttons; - how many buttons? JOYSTICK_STICK_INFO stick[n]; - stick state information JOYSTICK_BUTTON_INFO button[n]; - button state information } JOYSTICK_INFO; The button status is stored in the structure: typedef struct JOYSTICK_BUTTON_INFO { int b; - boolean on/off flag char *name; - description of this button } JOYSTICK_BUTTON_INFO; You may wish to display the button names as part of an input configuration screen to let the user choose what game function will be per- formed by each button, but in simpler situations you can safely assume that the first two elements in the button array will always be the main trigger controls. Each joystick will provide one or more stick inputs, of varying types. These can be digital controls which snap to specific positions (eg. a gamepad controller, the coolie hat on a Flightstick Pro or Wingman Extreme, or a normal joystick which hasn't yet been calibrated), or they can be full analogue inputs with a smooth range of motion. Sticks may also have different numbers of axes, for example a normal direc- tional control has two, but the Flightstick Pro throttle is only a single axis, and it is possible that the system could be extended in the future to support full 3d controllers. A stick input is described by the structure: typedef struct JOYSTICK_STICK_INFO { int flags; - status flags for this input int num_axis; - how many axes do we have? (note the misspelling) JOYSTICK_AXIS_INFO axis[n]; - axis state information char *name; - description of this input } JOYSTICK_STICK_INFO; A single joystick may provide several different stick inputs, but you can safely assume that the first element in the stick array will always be the main directional controller. Information about each of the stick axis is stored in the substructure: typedef struct JOYSTICK_AXIS_INFO { int pos; - analogue axis position int d1, d2; - digital axis position char *name; - description of this axis } JOYSTICK_AXIS_INFO; This provides both analogue input in the pos field (ranging from -128 to 128 or from 0 to 255, depending on the type of the control), and digital values in the d1 and d2 fields. For example, when describing the X-axis position, the pos field will hold the horizontal position of the joystick, d1 will be set if it is moved left, and d2 will be set if it is moved right. Allegro will fill in all these values regard- less of whether it is using a digital or analogue joystick, emulating the pos field for digital inputs by snapping it to the min, middle, and maximum positions, and emulating the d1 and d2 values for an analogue stick by comparing the current position with the centre point. The joystick flags field may contain any combination of the bit flags: JOYFLAG_DIGITAL This control is currently providing digital input. JOYFLAG_ANALOGUE This control is currently providing analogue input. JOYFLAG_CALIB_DIGITAL This control will be capable of providing digital input once it has been calibrated, but is not doing this at the moment. JOYFLAG_CALIB_ANALOGUE This control will be capable of providing analogue input once it has been calibrated, but is not doing this at the moment. JOYFLAG_CALIBRATE Indicates that this control needs to be calibrated. Many devices require multiple calibration steps, so you should call the calibrate_joystick() function from a loop until this flag is cleared. JOYFLAG_SIGNED Indicates that the analogue axis position is in signed format, ranging from -128 to 128. This is the case for all 2d direc- tional controls. JOYFLAG_UNSIGNED Indicates that the analogue axis position is in unsigned format, ranging from 0 to 255. This is the case for all 1d throt- tle controls. Note for people who spell funny: in case you don't like having to type "analogue", there are some #define aliases in allegro/joystick.h that will allow you to write "analog" instead. SEE ALSO
install_joystick(3alleg4), poll_joystick(3alleg4), num_joysticks(3alleg4), calibrate_joystick(3alleg4), calibrate_joystick_name(3alleg4), exjoy(3alleg4) Allegro version 4.4.2 joy(3alleg4)
All times are GMT -4. The time now is 01:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy