【雕爷学编程】Arduino动手做(138)---64位WS2812点阵屏模块3

news2024/12/22 11:10:06

37款传感器与执行器的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是不止这37种的。鉴于本人手头积累了一些传感器和执行器模块,依照实践出真知(一定要动手做)的理念,以学习和交流为目的,这里准备逐一动手尝试系列实验,不管成功(程序走通)与否,都会记录下来—小小的进步或是搞不掂的问题,希望能够抛砖引玉。

【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)
实验一百三十八:64位 WS2812B8*8 xRGB 5050 LED模块 ws2812s像素点阵屏

在这里插入图片描述
【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)

实验一百三十八:64位 WS2812B8*8 xRGB 5050 LED模块 ws2812s像素点阵屏

项目十四:快速淡入淡出循环变色

实验开源代码

/*

【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)

  实验一百三十八:64位 WS2812B8*8 xRGB 5050 LED模块 ws2812s像素点阵屏

 项目十四:快速淡入淡出循环变色

 实验接线

 Module  UNO

 VCC —— 3.3V

 GND —— GND

 DI —— D6

*/

#include <FastLED.h>

// How many leds in your strip?

#define NUM_LEDS 64 

// For led chips like Neopixels, which have a data line, ground, and power, you just

// need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock,

// ground, and power), like the LPD8806, define both DATA_PIN and CLOCK_PIN

#define DATA_PIN 6

//#define CLOCK_PIN 13

// Define the array of leds

CRGB leds[NUM_LEDS];

void setup() { 

    Serial.begin(57600);

    Serial.println("resetting");

    FastLED.addLeds<WS2812,DATA_PIN,RGB>(leds,NUM_LEDS);

    FastLED.setBrightness(24);

}

void fadeall() { for(int i = 0; i < NUM_LEDS; i++) { leds[i].nscale8(250); } }

void loop() { 

    static uint8_t hue = 0;

    Serial.print("x");

    // First slide the led in one direction

    for(int i = 0; i < NUM_LEDS; i++) {

        // Set the i'th led to red 

        leds[i] = CHSV(hue++, 255, 255);

        // Show the leds

        FastLED.show(); 

        // now that we've shown the leds, reset the i'th led to black

        // leds[i] = CRGB::Black;

        fadeall();

        // Wait a little bit before we loop around and do it again

        delay(10);

    }

    Serial.print("x");

    // Now go in the other direction.  

    for(int i = (NUM_LEDS)-1; i >= 0; i--) {

        // Set the i'th led to red 

        leds[i] = CHSV(hue++, 255, 255);

        // Show the leds

        FastLED.show();

        // now that we've shown the leds, reset the i'th led to black

        // leds[i] = CRGB::Black;

        fadeall();

        // Wait a little bit before we loop around and do it again

        delay(10);

    }

}


【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)

实验一百三十八:64位 WS2812B8*8 xRGB 5050 LED模块 ws2812s像素点阵屏

项目十五:每个 LED 灯条的颜色校正设置,以及总输出’色温’的总控制

实验开源代码

/*
  【Arduino】168种传感器模块系列实验(资料+代码+图形+仿真)
  实验一百四十六:64位WS2812B 8*8 xRGB 5050 LED模块 ws2812s像素点阵屏
  项目十五:每个 LED 灯条的颜色校正设置,以及总输出'色温'的总控制
  实验接线
  Module    UNO
  VCC —— 3.3V
  GND —— GND
  DI  ——  D6
*/

#include <FastLED.h>
#define LED_PIN     6
// Information about the LED strip itself
#define NUM_LEDS    64
#define CHIPSET     WS2811
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];
#define BRIGHTNESS  26

// FastLED v2.1 provides two color-management controls:
//   (1) color correction settings for each LED strip, and
//   (2) master control of the overall output 'color temperature' 
//
// THIS EXAMPLE demonstrates the second, "color temperature" control.
// It shows a simple rainbow animation first with one temperature profile,
// and a few seconds later, with a different temperature profile.
//
// The first pixel of the strip will show the color temperature.
//
// HELPFUL HINTS for "seeing" the effect in this demo:
// * Don't look directly at the LED pixels.  Shine the LEDs aganst
//   a white wall, table, or piece of paper, and look at the reflected light.
//
// * If you watch it for a bit, and then walk away, and then come back 
//   to it, you'll probably be able to "see" whether it's currently using
//   the 'redder' or the 'bluer' temperature profile, even not counting
//   the lowest 'indicator' pixel.
//
//
// FastLED provides these pre-conigured incandescent color profiles:
//     Candle, Tungsten40W, Tungsten100W, Halogen, CarbonArc,
//     HighNoonSun, DirectSunlight, OvercastSky, ClearBlueSky,
// FastLED provides these pre-configured gaseous-light color profiles:
//     WarmFluorescent, StandardFluorescent, CoolWhiteFluorescent,
//     FullSpectrumFluorescent, GrowLightFluorescent, BlackLightFluorescent,
//     MercuryVapor, SodiumVapor, MetalHalide, HighPressureSodium,
// FastLED also provides an "Uncorrected temperature" profile
//    UncorrectedTemperature;

#define TEMPERATURE_1 Tungsten100W
#define TEMPERATURE_2 OvercastSky

// How many seconds to show each temperature before switching
#define DISPLAYTIME 20
// How many seconds to show black between switches
#define BLACKTIME   3

void loop()
{
  // draw a generic, no-name rainbow
  static uint8_t starthue = 0;
  fill_rainbow( leds + 5, NUM_LEDS - 5, --starthue, 20);

  // Choose which 'color temperature' profile to enable.
  uint8_t secs = (millis() / 1000) % (DISPLAYTIME * 2);
  if( secs < DISPLAYTIME) {
    FastLED.setTemperature( TEMPERATURE_1 ); // first temperature
    leds[0] = TEMPERATURE_1; // show indicator pixel
  } else {
    FastLED.setTemperature( TEMPERATURE_2 ); // second temperature
    leds[0] = TEMPERATURE_2; // show indicator pixel
  }

  // Black out the LEDs for a few secnds between color changes
  // to let the eyes and brains adjust
  if( (secs % DISPLAYTIME) < BLACKTIME) {
    memset8( leds, 0, NUM_LEDS * sizeof(CRGB));
  }
  
  FastLED.show();
  FastLED.delay(8);
}

void setup() {
  delay( 3000 ); // power-up safety delay
  // It's important to set the color correction for your LED strip here,
  // so that colors can be more accurately rendered through the 'temperature' profiles
  FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalSMD5050 );
  FastLED.setBrightness( BRIGHTNESS );
}

【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)

实验一百三十八:64位 WS2812B8*8 xRGB 5050 LED模块 ws2812s像素点阵屏

项目十六:FastLED“100行代码”演示卷轴动画效果

实验开源代码

/*

【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)

  实验一百三十八:64位 WS2812B8*8 xRGB 5050 LED模块 ws2812s像素点阵屏

 项目十六:FastLED“100行代码”演示卷轴动画效果

 实验接线

 Module  UNO

 VCC —— 3.3V

 GND —— GND

 DI —— D6

*/

#include <FastLED.h>

FASTLED_USING_NAMESPACE

// FastLED "100-lines-of-code" demo reel, showing just a few 

// of the kinds of animation patterns you can quickly and easily 

// compose using FastLED.  

//

// This example also shows one easy way to define multiple 

// animations patterns and have them automatically rotate.

//

// -Mark Kriegsman, December 2014

#define DATA_PIN  6

//#define CLK_PIN  4

#define LED_TYPE  WS2811

#define COLOR_ORDER GRB

#define NUM_LEDS  64

CRGB leds[NUM_LEDS];

#define BRIGHTNESS     26

#define FRAMES_PER_SECOND 120

void setup() {

 delay(3000); // 3 second delay for recovery

  

 // tell FastLED about the LED strip configuration

 FastLED.addLeds<LED_TYPE,DATA_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);

 //FastLED.addLeds<LED_TYPE,DATA_PIN,CLK_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);

 // set master brightness control

 FastLED.setBrightness(BRIGHTNESS);

}

// List of patterns to cycle through. Each is defined as a separate function below.

typedef void (*SimplePatternList[])();

SimplePatternList gPatterns = { rainbow, rainbowWithGlitter, confetti, sinelon, juggle, bpm };

uint8_t gCurrentPatternNumber = 0; // Index number of which pattern is current

uint8_t gHue = 0; // rotating "base color" used by many of the patterns

  

void loop()

{

 // Call the current pattern function once, updating the 'leds' array

 gPatterns[gCurrentPatternNumber]();

 // send the 'leds' array out to the actual LED strip

 FastLED.show();  

 // insert a delay to keep the framerate modest

 FastLED.delay(1000/FRAMES_PER_SECOND); 

 // do some periodic updates

 EVERY_N_MILLISECONDS( 20 ) { gHue++; } // slowly cycle the "base color" through the rainbow

 EVERY_N_SECONDS( 10 ) { nextPattern(); } // change patterns periodically

}

#define ARRAY_SIZE(A) (sizeof(A) / sizeof((A)[0]))

void nextPattern()

{

 // add one to the current pattern number, and wrap around at the end

 gCurrentPatternNumber = (gCurrentPatternNumber + 1) % ARRAY_SIZE( gPatterns);

}

void rainbow() 

{

 // FastLED's built-in rainbow generator

 fill_rainbow( leds, NUM_LEDS, gHue, 7);

}

void rainbowWithGlitter() 

{

 // built-in FastLED rainbow, plus some random sparkly glitter

 rainbow();

 addGlitter(80);

}

void addGlitter( fract8 chanceOfGlitter) 

{

 if( random8() < chanceOfGlitter) {

  leds[ random16(NUM_LEDS) ] += CRGB::White;

 }

}

void confetti() 

{

 // random colored speckles that blink in and fade smoothly

 fadeToBlackBy( leds, NUM_LEDS, 10);

 int pos = random16(NUM_LEDS);

 leds[pos] += CHSV( gHue + random8(64), 200, 255);

}

void sinelon()

{

 // a colored dot sweeping back and forth, with fading trails

 fadeToBlackBy( leds, NUM_LEDS, 20);

 int pos = beatsin16( 13, 0, NUM_LEDS-1 );

 leds[pos] += CHSV( gHue, 255, 192);

}

void bpm()

{

 // colored stripes pulsing at a defined Beats-Per-Minute (BPM)

 uint8_t BeatsPerMinute = 62;

 CRGBPalette16 palette = PartyColors_p;

 uint8_t beat = beatsin8( BeatsPerMinute, 64, 255);

 for( int i = 0; i < NUM_LEDS; i++) { //9948

  leds[i] = ColorFromPalette(palette, gHue+(i*2), beat-gHue+(i*10));

 }

}

void juggle() {

 // eight colored dots, weaving in and out of sync with each other

 fadeToBlackBy( leds, NUM_LEDS, 20);

 uint8_t dothue = 0;

 for( int i = 0; i < 8; i++) {

  leds[beatsin16( i+7, 0, NUM_LEDS-1 )] |= CHSV(dothue, 200, 255);

  dothue += 32;

 }

}


【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)

实验一百三十八:64位 WS2812B8*8 xRGB 5050 LED模块 ws2812s像素点阵屏

项目十七:随机60帧火焰花

实验开源代码

/*

【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)

  实验一百三十八:64位 WS2812B8*8 xRGB 5050 LED模块 ws2812s像素点阵屏

 项目十七:随机60帧火焰花

 实验接线

 Module  UNO

 VCC —— 3.3V

 GND —— GND

 DI —— D6

*/

#include <FastLED.h>

#define LED_PIN   6

#define COLOR_ORDER GRB

#define CHIPSET   WS2811

#define NUM_LEDS  64

#define BRIGHTNESS 22

#define FRAMES_PER_SECOND 60

bool gReverseDirection = false;

CRGB leds[NUM_LEDS];

void setup() {

 delay(3000); // sanity delay

 FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );

 FastLED.setBrightness( BRIGHTNESS );

}

void loop()

{

 // Add entropy to random number generator; we use a lot of it.

 // random16_add_entropy( random());

 Fire2012(); // run simulation frame

 FastLED.show(); // display this frame

 FastLED.delay(1000 / FRAMES_PER_SECOND);

}

// Fire2012 by Mark Kriegsman, July 2012

// as part of "Five Elements" shown here: http://youtu.be/knWiGsmgycY



// This basic one-dimensional 'fire' simulation works roughly as follows:

// There's a underlying array of 'heat' cells, that model the temperature

// at each point along the line. Every cycle through the simulation,

// four steps are performed:

// 1) All cells cool down a little bit, losing heat to the air

// 2) The heat from each cell drifts 'up' and diffuses a little

// 3) Sometimes randomly new 'sparks' of heat are added at the bottom

// 4) The heat from each cell is rendered as a color into the leds array

//   The heat-to-color mapping uses a black-body radiation approximation.

//

// Temperature is in arbitrary units from 0 (cold black) to 255 (white hot).

//

// This simulation scales it self a bit depending on NUM_LEDS; it should look

// "OK" on anywhere from 20 to 100 LEDs without too much tweaking.

//

// I recommend running this simulation at anywhere from 30-100 frames per second,

// meaning an interframe delay of about 10-35 milliseconds.

//

// Looks best on a high-density LED setup (60+ pixels/meter).

//

//

// There are two main parameters you can play with to control the look and

// feel of your fire: COOLING (used in step 1 above), and SPARKING (used

// in step 3 above).

//

// COOLING: How much does the air cool as it rises?

// Less cooling = taller flames. More cooling = shorter flames.

// Default 50, suggested range 20-100

#define COOLING 55

// SPARKING: What chance (out of 255) is there that a new spark will be lit?

// Higher chance = more roaring fire. Lower chance = more flickery fire.

// Default 120, suggested range 50-200.

#define SPARKING 120

void Fire2012()

{

 // Array of temperature readings at each simulation cell

 static uint8_t heat[NUM_LEDS];

 // Step 1. Cool down every cell a little

 for ( int i = 0; i < NUM_LEDS; i++) {

  heat[i] = qsub8( heat[i], random8(0, ((COOLING * 10) / NUM_LEDS) + 2));

 }

 // Step 2. Heat from each cell drifts 'up' and diffuses a little

 for ( int k = NUM_LEDS - 1; k >= 2; k--) {

  heat[k] = (heat[k - 1] + heat[k - 2] + heat[k - 2] ) / 3;

 }

 // Step 3. Randomly ignite new 'sparks' of heat near the bottom

 if ( random8() < SPARKING ) {

  int y = random8(7);

  heat[y] = qadd8( heat[y], random8(160, 255) );

 }

 // Step 4. Map from heat cells to LED colors

 for ( int j = 0; j < NUM_LEDS; j++) {

  CRGB color = HeatColor( heat[j]);

  int pixelnumber;

  if ( gReverseDirection ) {

   pixelnumber = (NUM_LEDS - 1) - j;

  } else {

   pixelnumber = j;

  }

  leds[pixelnumber] = color;

 }

}

【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)

实验一百三十八:64位 WS2812B8*8 xRGB 5050 LED模块 ws2812s像素点阵屏

项目十八:带有可编程调色板的 Fire2012 火灾模拟

实验开源代码

/*

【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)

  实验一百三十八:64位 WS2812B8*8 xRGB 5050 LED模块 ws2812s像素点阵屏

 项目十八:带有可编程调色板的 Fire2012 火灾模拟

 实验接线

 Module  UNO

 VCC —— 3.3V

 GND —— GND

 DI —— D6

*/

#include <FastLED.h>

#define LED_PIN   6

#define COLOR_ORDER GRB

#define CHIPSET   WS2811

#define NUM_LEDS  64

#define BRIGHTNESS 22

#define FRAMES_PER_SECOND 60

bool gReverseDirection = false;

CRGB leds[NUM_LEDS];

// Fire2012 with programmable Color Palette

//

// This code is the same fire simulation as the original "Fire2012",

// but each heat cell's temperature is translated to color through a FastLED

// programmable color palette, instead of through the "HeatColor(...)" function.

//

// Four different static color palettes are provided here, plus one dynamic one.

// 

// The three static ones are: 

//  1. the FastLED built-in HeatColors_p -- this is the default, and it looks

//   pretty much exactly like the original Fire2012.

//

// To use any of the other palettes below, just "uncomment" the corresponding code.

//

//  2. a gradient from black to red to yellow to white, which is

//   visually similar to the HeatColors_p, and helps to illustrate

//   what the 'heat colors' palette is actually doing,

//  3. a similar gradient, but in blue colors rather than red ones,

//   i.e. from black to blue to aqua to white, which results in

//   an "icy blue" fire effect,

//  4. a simplified three-step gradient, from black to red to white, just to show

//   that these gradients need not have four components; two or

//   three are possible, too, even if they don't look quite as nice for fire.

//

// The dynamic palette shows how you can change the basic 'hue' of the

// color palette every time through the loop, producing "rainbow fire".

CRGBPalette16 gPal;

void setup() {

 delay(3000); // sanity delay

 FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );

 FastLED.setBrightness( BRIGHTNESS );

 // This first palette is the basic 'black body radiation' colors,

 // which run from black to red to bright yellow to white.

 gPal = HeatColors_p;

  

 // These are other ways to set up the color palette for the 'fire'.

 // First, a gradient from black to red to yellow to white -- similar to HeatColors_p

 //  gPal = CRGBPalette16( CRGB::Black, CRGB::Red, CRGB::Yellow, CRGB::White);

  

 // Second, this palette is like the heat colors, but blue/aqua instead of red/yellow

 //  gPal = CRGBPalette16( CRGB::Black, CRGB::Blue, CRGB::Aqua, CRGB::White);

  

 // Third, here's a simpler, three-step gradient, from black to red to white

 //  gPal = CRGBPalette16( CRGB::Black, CRGB::Red, CRGB::White);

}

void loop()

{

 // Add entropy to random number generator; we use a lot of it.

 random16_add_entropy( random());

 // Fourth, the most sophisticated: this one sets up a new palette every

 // time through the loop, based on a hue that changes every time.

 // The palette is a gradient from black, to a dark color based on the hue,

 // to a light color based on the hue, to white.

 //

 //  static uint8_t hue = 0;

 //  hue++;

 //  CRGB darkcolor = CHSV(hue,255,192); // pure hue, three-quarters brightness

 //  CRGB lightcolor = CHSV(hue,128,255); // half 'whitened', full brightness

 //  gPal = CRGBPalette16( CRGB::Black, darkcolor, lightcolor, CRGB::White);

 Fire2012WithPalette(); // run simulation frame, using palette colors

  

 FastLED.show(); // display this frame

 FastLED.delay(1000 / FRAMES_PER_SECOND);

}

// Fire2012 by Mark Kriegsman, July 2012

// as part of "Five Elements" shown here: http://youtu.be/knWiGsmgycY

 

// This basic one-dimensional 'fire' simulation works roughly as follows:

// There's a underlying array of 'heat' cells, that model the temperature

// at each point along the line. Every cycle through the simulation, 

// four steps are performed:

// 1) All cells cool down a little bit, losing heat to the air

// 2) The heat from each cell drifts 'up' and diffuses a little

// 3) Sometimes randomly new 'sparks' of heat are added at the bottom

// 4) The heat from each cell is rendered as a color into the leds array

//   The heat-to-color mapping uses a black-body radiation approximation.

//

// Temperature is in arbitrary units from 0 (cold black) to 255 (white hot).

//

// This simulation scales it self a bit depending on NUM_LEDS; it should look

// "OK" on anywhere from 20 to 100 LEDs without too much tweaking. 

//

// I recommend running this simulation at anywhere from 30-100 frames per second,

// meaning an interframe delay of about 10-35 milliseconds.

//

// Looks best on a high-density LED setup (60+ pixels/meter).

//

//

// There are two main parameters you can play with to control the look and

// feel of your fire: COOLING (used in step 1 above), and SPARKING (used

// in step 3 above).

//

// COOLING: How much does the air cool as it rises?

// Less cooling = taller flames. More cooling = shorter flames.

// Default 55, suggested range 20-100 

#define COOLING 55

// SPARKING: What chance (out of 255) is there that a new spark will be lit?

// Higher chance = more roaring fire. Lower chance = more flickery fire.

// Default 120, suggested range 50-200.

#define SPARKING 120

void Fire2012WithPalette()

{

// Array of temperature readings at each simulation cell

 static uint8_t heat[NUM_LEDS];

 // Step 1. Cool down every cell a little

  for( int i = 0; i < NUM_LEDS; i++) {

   heat[i] = qsub8( heat[i], random8(0, ((COOLING * 10) / NUM_LEDS) + 2));

  }

  

  // Step 2. Heat from each cell drifts 'up' and diffuses a little

  for( int k= NUM_LEDS - 1; k >= 2; k--) {

   heat[k] = (heat[k - 1] + heat[k - 2] + heat[k - 2] ) / 3;

  }

   

  // Step 3. Randomly ignite new 'sparks' of heat near the bottom

  if( random8() < SPARKING ) {

   int y = random8(7);

   heat[y] = qadd8( heat[y], random8(160,255) );

  }

  // Step 4. Map from heat cells to LED colors

  for( int j = 0; j < NUM_LEDS; j++) {

   // Scale the heat value from 0-255 down to 0-240

   // for best results with color palettes.

   uint8_t colorindex = scale8( heat[j], 240);

   CRGB color = ColorFromPalette( gPal, colorindex);

   int pixelnumber;

   if( gReverseDirection ) {

    pixelnumber = (NUM_LEDS-1) - j;

   } else {

    pixelnumber = j;

   }

   leds[pixelnumber] = color;

  }

}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/746199.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【基于openEuler上安装单机openGauss2.1.0企业版】

【基于openEuler上安装openGauss2.1.0企业版】 一、环境说明二、安装步骤 一、环境说明 华为云ECS 规格 8核32G操作系统openEuler 20.03 TLS 二、安装步骤 修改操作系统字符集为utf8 cat >>/etc/profile<<EOF export LANGen_US.UTF-8 EOF让环境变量生效 source /…

ASCII码对照表 十六进制的字符对照表

ASCII码对照表&#xff08;包括二进制、十进制十六进制和字符&#xff09; 可以显示 不可以显示

天津良心web前端培训学校品牌汇总(Web前端的起步薪资)

现在很多小伙伴想要了解web前端开发技术知识&#xff0c;但是不知道现在学习web前端值不值得&#xff0c;会有很多小伙伴开始犹豫学不学&#xff0c;学完能不能找到工作&#xff0c;那下面小编就通过下面三点&#xff0c;来给大家简单分析一下web行业&#xff0c;以及要不要报班…

Layui之可调参数的动态轮播图---好玩的小玩意儿~

⭐ 本期精彩&#xff1a;利用Layui制作轮播图 效果图&#xff1a; 前台代码&#xff1a; JS代码&#xff1a; 设置长宽高的事件代码&#xff1a; //事件carousel.on(change(test1), function(res){console.log(res)});var $ layui.$, active {set: function(othis){var THIS…

intellij idea开发微信远程小程序

原理 intellij idea开发微信原生小程序的基本原理是&#xff0c;在idea中编辑目标文件&#xff08;wxml、wxss&#xff09;&#xff0c;微信开发者工具热加载改动&#xff0c;从而实时看到效果&#xff0c;微信开发者工具的提示、高亮等能力&#xff0c;都太弱了&#xff0c;所…

Android自动化测试-UiAutomator环境搭建

目录 一、环境准备 二、新建Android Studio工程 三、测试实例 总结&#xff1a; 一、环境准备 1. 安装android sdk&#xff0c;并配置环境变量 2. 安装android studio&#xff0c;国内访问官网受限&#xff0c;如果下载不到&#xff0c;可以到我的百度云盘下载&#xff1a; …

Java设计模式之行为型-责任链模式(UML类图+案例分析)

目录 一、基础概念 二、UML类图 三、角色设计 四、案例分析 五、总结 一、基础概念 责任链模式是一种行为设计模式,它允许你将请求沿着处理者链进行发送。请求会被链上每个处理者处理,直到请求被处理完毕。该模式主要解决的是请求的发送者和多个请求处理者之间建立一条链…

交易策略对交易者多重要,4点讲明白

初入交易市场的交易者&#xff0c;一定听过交易策略你对交易者的重要性&#xff0c;但是您可能不明白为什么&#xff0c;今天Forexclub通过4点给初入交易市场的交易者&#xff0c;讲解交易策略的重要。希望能帮助到各位刚进入交易市场的初学者。 首先&#xff0c;当交易者确定好…

数字农业农村数字化整体解决方案

导读&#xff1a;原文《数字农业农村解决方案 》共69页ppt&#xff08;获取来源见文尾&#xff09;&#xff0c;本文精选其中精华及架构部分&#xff0c;逻辑清晰、内容完整&#xff0c;为快速形成售前方案提供参考 完整版领取方式 完整版领取方式&#xff1a; 如需获取完整的电…

LangChain快速开始

什么是LangChain langchain 是一个框架&#xff0c; 用于连接大语言模型的框架&#xff0c; 它提供了一整套工具、组件和接口&#xff0c;简化上层应用与大语言模型&#xff0c;聊天模型的的过程&#xff0c;可轻松管理与模型的交互&#xff0c;以及跟多组件链接起来。 在 La…

创建空对象{}的数组,空对象地址是否指向同一处

今天&#xff0c;突发奇想&#xff0c;突然想到这个奇葩的问题&#xff0c;实践才是检验真理的唯一标准&#xff0c;下面一一举例验证这个问题的可能性&#x1f601;&#x1f601;&#x1f601;。 首先&#xff0c;创建空对象的数组的方式有多种 &#x1f440;&#x1f440;方…

ChatGPT 最佳实践指南之:将复杂任务拆分为较简单的子任务

Split complex tasks into simpler subtasks 将复杂任务分解为较简单的子任务 Just as it is good practice in software engineering to decompose a complex system into a set of modular components, the same is true of tasks submitted to GPTs. Complex tasks tend to …

Maven学习及分模块创建

一、引言 1.1 项目管理问题 写项目时&#xff0c;我们需要引用各种 jar 包&#xff0c;尤其是比较大的工程&#xff0c;引用的 jar 包往往有几十个乃至上百个&#xff0c; 每用 到一种 jar 包&#xff0c;都需要手动引入工程目录&#xff0c;而且经常遇到各种让人抓狂的 jar 包…

【Hello mysql】 mysql的复合查询 (重点)

Mysql专栏&#xff1a;Mysql 本篇博客简介&#xff1a;介绍mysql的复合查询 mysql的复合查询 基本查询回顾查询工资高于500或岗位为MANAGER的雇员&#xff0c;同时还要满足他们的姓名首字母为大写的J按照部门号升序而雇员的工资降序排序使用年薪进行降序排序显示工资最高的员工…

kgm --> mp3

kgm转换mp3 kgm应该是kugou那个音乐播放器的音乐文件吧&#xff0c;把mp3转成自己定义的文件 转换工具&#xff0c;免费一天3首 转换完成头部&#xff0c;添加了几秒的广告&#xff01;&#xff01;&#xff01;唉 转换修改mp3头部 作为有开发经验的我&#xff0c;哪里有法子…

音视频编码实战-------pcm+yuv数据转成MP4

文章目录 1.编码流程图2.相关模块及函数2.1 编码器相关API2.2 复用器相关API2.3 重采样相关API注意点 简单的编码流程相关代码 1.编码流程图 2.相关模块及函数 2.1 编码器相关API avcodec_find_encoder: 根据编码器ID查找编码器 avcodec_alloc_context3:创建编码器上下文 avc…

使用wxPtyon和pillow开发拼图小游戏(一)

刚学习python&#xff0c;心血来潮&#xff0c;使用wxPython和pillow开了一个简单的拼图小游戏&#xff0c;大家分享一下 wxPython是Python语言的一套优秀的GUI图形库&#xff0c;在此项目里主要用来开发GUI客户页面&#xff1b;Pillow是一个非常好用的图像处理库&#xff0c;…

Python编译器Pycharm使用技巧

欢迎来到mo的python学习之路 目录 pycharm一些小技巧 1.更换pycharm主题颜色 1.1默认颜色 1.2设置其他颜色 2.汉化 2.1具体操作 3. 创建python包和文件 &#xff0c;运行python文件 3.1创建python包 3.2创建python文件 3.3运行python文件 3.快捷方式 pycharm一些小技巧 …

2023年11月软考高级网络规划设计师报名时间-报名入口-报名流程

软考高级网络规划设计师报名时间&#xff1a; 广东2023下半年软考高级网络规划设计师报名时间&#xff1a;8月16日9:00-8月24日17:00 江西2023下半年软考高级网络规划设计师报名时间&#xff1a;8月15日9点-9月8日17点 安徽2023下半年软考高级网络规划设计师报名时间&#x…

NTIRE 2023 Challenge on Efficient Super-Resolution——RepRFN:当RFDN遇到重参数化

RepRFN&#xff1a;当RFDN遇到重参数化 0. 简介 NTIRE 的全称为New Trends in Image Restoration and Enhancement Challenges&#xff0c;即“图像复原和增强挑战中的新趋势”&#xff0c;是CVPR(IEEE Conference on Computer Vision and Pattern Recognition)举办的极具影响…