The Alpha Geek – Geeking Out

Programming and Coding

——

#DonLucElectronics #DonLuc #SparkFunRedBoard #Coding #Movement #9DOF #Magnetometer #Accelerometer #Gyroscope #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Programming and Coding

——

Programming and Coding

——

Programming and Coding

——

Programming and Coding

Most of the development in the world is all because of technology. Technology has grown much faster than everything else. All the technology is developed because of coding and programming. Programming and coding hold a vital role in development. It also includes developments from small projects to big projects.

The programming vs coding difference lies in the very definition of both processes. Programming is the general process of creating a program that follows certain standards and performs a certain task. Coding, on the other hand, is a part of programming that deals strictly with converting the language we understand into binary commands for the machine.

As we have discussed before in our discussion on programming vs coding, coding is just a part of programming. Yet, it still requires some time and skill to learn. Programming languages are very different from natural languages, and their syntax can sometimes be very confusing. The hardest languages are low-level ones that are close to actual processor instructions.

Programming

Programmers, on the other hand, need to review documentation and perform analysis besides coding which requires extra tools. You can find various code analysis tools, code generators, databases and testing frameworks in their inventory. Programming is passing the instructions and information to the computer that describes how a program should be carried out. Programming helps computers to perform certain actions. Various types of programming languages available in the market, like C, C++, Java, Python, etc., help develop new and creative technology.

Coding

Since coding is a simple act of translation, you don’t need much to perform it. In most cases, a simple text editor would suffice. Coding is a process of establishing a successful communication between a software program and the computer hardware. The compilers translate the program into assembly language. The coding process converts the assembly language to Binary Coded Signals.

Computer systems are electronic devices that rely on binary coded signals for communication and functioning. The two types of binary coded signals are o’s and 1’s. These signals are generated using switches and transistors. In the process of coding the high-level language and the assembly level languages are translated into binary codes and the communication between the computer hardware and software application is established.

Microcontrollers – Arduino IDE

Since the launch of the Arduino open-source platform, the brand has established themselves at the center of an expansive open-source community. The Arduino ecosystem is comprised of a diverse combination of hardware and software. The versatility of Arduino and its simple interface makes it a leading choice for a wide range of users around the world from hobbyists, designers, and artists to product prototypes.

Arduino code is written in C++ with an addition of special methods and functions, which we’ll mention later on. C++ is a human-readable programming language. When you create a “Sketch”, the name given to Arduino code files. The Arduino Integrated Development Environment (IDE) is the main text editing program used for Arduino programming. It is where you’ll be typing up your code before uploading it to the board you want to program. Arduino coding it is processed and compiled to machine language.

DL2211Mk03

1 x SparkFun RedBoard Qwiic
1 x SparkFun Micro OLED (Qwiic)
1 x Qwiic Cable – 100mm
1 x SparkFun 9 Degrees of Freedom – Sensor Stick
1 x SparkFun Cerberus USB Cable

SparkFun RedBoard Qwiic

SDA – Analog A4
SCL – Analog A5
VIN – +3.3V
GND – GND

——

DL2211Mk03p.ino

/* ***** Don Luc Electronics © *****
Software Version Information
Project #25 - Movement - 9-DOF - Mk04
25-04
DL2210Mk06p.ino
1 x SparkFun RedBoard Qwiic
1 x SparkFun Micro OLED (Qwiic)
1 x Qwiic Cable - 100mm
1 x SparkFun 9 Degrees of Freedom - Sensor Stick
1 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// Two Wire Interface (TWI/I2C)
#include <Wire.h>
// SparkFun Micro OLED
#include <SFE_MicroOLED.h>
// Includes and variables for IMU integration
// Accelerometer
#include <ADXL345.h>
// Magnetometer
#include <HMC58X3.h>
// MEMS Gyroscope
#include <ITG3200.h>
// Debug
#include "DebugUtils.h"
// FreeIMU
#include <CommunicationUtils.h>
#include <FreeIMU.h>

// Set the FreeIMU object
FreeIMU my3IMU = FreeIMU();

// Yaw Pitch Roll
float ypr[3];
float Yaw = 0;
float Pitch = 0;
float Roll = 0;

// SparkFun Micro OLED
#define PIN_RESET 9
#define DC_JUMPER 1
// I2C declaration
MicroOLED oled(PIN_RESET, DC_JUMPER);

// Software Version Information
String sver = "25-04";

void loop() {

  // isFreeIMU
  isFreeIMU();
  
  // Micro OLED
  isMicroOLED();

  // One delay in between reads
  delay(1000);
  
}

getFreeIMU.ino

// FreeIMU
// isFreeIMU
void isFreeIMU(){

  // FreeIMU
  // Yaw Pitch Roll
  my3IMU.getYawPitchRoll(ypr);
  // Yaw
  Yaw = ypr[0];
  // Pitch
  Pitch = ypr[1];
  // Roll
  Roll = ypr[2];

}

getMicroOLED.ino

// SparkFun Micro OLED
// Setup Micro OLED
void isSetupMicroOLED() {

  // Initialize the OLED
  oled.begin();
  // Clear the display's internal memory
  oled.clear(ALL);
  // Display what's in the buffer (splashscreen)
  oled.display();

  // Delay 1000 ms
  delay(1000);

  // Clear the buffer.
  oled.clear(PAGE);
  
}
// Micro OLED
void isMicroOLED() {

  // Text Display FreeIMU
  // Clear the display
  oled.clear(PAGE);
  // Set cursor to top-left
  oled.setCursor(0, 0);
  // Set font to type 0
  oled.setFontType(0);
  // FreeIMU
  oled.print("FreeIMU");
  oled.setCursor(0, 12);
  // Yaw
  oled.print("Y: ");
  oled.print(Yaw);
  oled.setCursor(0, 25);
  // Pitch
  oled.print("P: ");
  oled.print(Pitch);
  oled.setCursor(0, 39);
  // Roll
  oled.print("R: ");
  oled.print(Roll);
  oled.display();

}

setup.ino

// Setup
void setup() {

  // Give display time to power on
  delay(100);
  
  // Set up I2C bus
  Wire.begin();

  // Setup Micro OLED
  isSetupMicroOLED();

  // Pause
  delay(5);
  // Initialize IMU
  my3IMU.init();
  // Pause
  delay(5);

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Technology Experience

  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • RTOS
  • Research & Development (R & D)

Instructor, E-Mentor, STEAM, and Arts-Based Training

  • IoT
  • PIC Microcontrollers
  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics

Follow Us

Luc Paquin – Curriculum Vitae – 2023
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/channel/UC5eRjrGn1CqkkGfZy0jxEdA
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/

Don Luc

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories
Archives